PageSourceSearch

https://slantapp.ai/assets/index-tc5-nNLC.js

js slantapp.ai collected 2026-10-05 15:04:52 UTC 1,714,099 bytes, 1,317 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Landing-kavAgr_x.js","assets/slant-logo-official-BczPicMq.js","assets/globe-CrY5Q3gB.js","assets/coins-B0XOg3gp.js","assets/circle-check-B8vEXYAG.js","assets/lock-CWiCoas5.js","assets/terminal-BA6PlMf1.js","assets/mail-DG8jvVe4.js","assets/Home-C4jiG6EP.js","assets/chevron-down-DOFZ7rzv.js","assets/send-B0Xv9vwc.js","assets/DestinationDetail-BekTVqhd.js","assets/zod-Bu1KJ1kD.js","assets/schema-BgUuUWTj.js","assets/types-BkAQ3Jcx.js","assets/select-Bsa-6vNv.js","assets/index-C-y5wYFI.js","assets/chevron-up-1gTexUQn.js","assets/label-MwGx_WS4.js","assets/textarea-DN2rY_yY.js","assets/form-BdD-KO2h.js","assets/ObjectUploader-CHjzmTJQ.js","assets/throttle-BDyZMAVR.js","assets/chevron-left-ObYy0wWc.js","assets/pause-Dw-0TJF1.js","assets/play-DZhwD__F.js","assets/hotel-BRZfVFiM.js","assets/message-square-BbWo1nY5.js","assets/bookingProviderLabels-sk8eXM4M.js","assets/lightbulb-BBExVgZ9.js","assets/info-yYpYmMbQ.js","assets/external-link-wMXh6D17.js","assets/utensils-DFWiThh_.js","assets/sun-CoS5iVHK.js","assets/moon-CiX55F7n.js","assets/arrow-left-kYemJdx8.js","assets/upload-KKjnUBTz.js","assets/thumbs-up-EPdp9vjE.js","assets/eye-7YOw3q0i.js","assets/headphones-CtyxSCr9.js","assets/list-Czfb4XTV.js","assets/eye-off-BLcZboHe.js","assets/Routes-BbQZSXo_.js","assets/alert-dialog-BhS3-18U.js","assets/filter-DmG6gd0Q.js","assets/ellipsis-vertical-DKxVzYXD.js","assets/square-pen-Bm9oADRS.js","assets/RouteDetail-DjMX96er.js","assets/ShareDialog-YMT0XEB7.js","assets/index-CA8G2zMx.js","assets/index-CJAmMy_E.js","assets/copy-Bquar6tk.js","assets/InteractiveViewer-DW1NW_vm.js","assets/slider-C2Y0X2uK.js","assets/tabs-D2OfY7RH.js","assets/useUserFeatures-Bw0KUV0f.js","assets/maximize-2-B_tQmco5.js","assets/GoogleMap-CD0jwBNv.js","assets/utensils-crossed-Bhs6Ah8Z.js","assets/car-1fd8vI3H.js","assets/LinkedReservations-D-Dnr3N8.js","assets/bookingDestination-DhRDew4k.js","assets/link-BigN4W0t.js","assets/ship-OnXFWfok.js","assets/tram-front-Bt1F7iED.js","assets/hash-B1pZho-G.js","assets/pen-line-B7H07o8v.js","assets/crown-BaX0qJx5.js","assets/git-branch-BtAfSLNp.js","assets/git-fork-D8aNcZXu.js","assets/wrench-yyw38-Zy.js","assets/user-check-BSZ0rU59.js","assets/history-C6tClkbn.js","assets/RouteForm-2R09pESC.js","assets/switch-B37nBmXq.js","assets/save-IxPgLFqm.js","assets/CreateRoute-Ce2uz7VF.js","assets/VoiceCommandTrigger-C43pwYgz.js","assets/progress-CJIgvptw.js","assets/file-video-B2iNHg8C.js","assets/brain-CLO2UL--.js","assets/index-CzFxOrc8.js","assets/index-Bf1HScv8.js","assets/alert-DfCdUCbk.js","assets/file-image-0Ms4XWGh.js","assets/circle-check-big-CUgqPmz6.js","assets/Notes-6vfoLhgI.js","assets/Checklists-WRy8ZKjj.js","assets/checkbox-DUKovseV.js","assets/list-checks-KgTBjYya.js","assets/bookmark-cI46Vvtb.js","assets/VideoAnalysis-GiNkp1aU.js","assets/sortable.esm-BSiVliNl.js","assets/grip-vertical-wW0VvTEo.js","assets/Discover-UOsDDWMH.js","assets/FollowButton-BSOyD54W.js","assets/user-minus-Djk9Emas.js","assets/sliders-horizontal-cT5PL8wM.js","assets/ContentWall-BWyqCrTI.js","assets/CreatorCollection-dCNcdytq.js","assets/image-CUhS0kqX.js","assets/CreatorStudio-Drt_a0TH.js","assets/addDays-LHkC9Hbt.js","assets/format-D3jHS6VA.js","assets/differenceInCalendarDays-YJe1lx93.js","assets/setMonth-XnH47YBf.js","assets/calendar-plus-D4DZjrPg.js","assets/twitter-DFPk9uR7.js","assets/facebook-DbspwSBJ.js","assets/youtube-BIudLhIY.js","assets/instagram-1o4cdpgt.js","assets/parseISO-DzkD68en.js","assets/type-CI5hK1ZH.js","assets/paintbrush-CfsRqtAP.js","assets/party-popper-GuyWa3aC.js","assets/phone-DkyZOs2j.js","assets/square-check-big-CjvE2IRz.js","assets/mic-vocal-FCXr3-US.js","assets/download-DtCkiRGd.js","assets/pencil-C45dJbNG.js","assets/accordion-CDMY0rhQ.js","assets/index-DL2Sqs6c.js","assets/file-check-DNqLAA85.js","assets/smartphone-Cj9B-Tof.js","assets/layout-grid-CVeRfsFQ.js","assets/rocket-BSE7fGo7.js","assets/scissors-lbXQ6ZKf.js","assets/captions-BCYgmtHC.js","assets/skip-forward-Dewm6kiF.js","assets/Community-8iPup0Vq.js","assets/GroupDetail-DpMW6y_h.js","assets/Recommendations-BJ3GDTbs.js","assets/Chat-BF8wZtX6.js","assets/RecommendationWizard-OoPlwljz.js","assets/radio-group-DyfPIJZB.js","assets/TemplateLibrary-CKdBvHRj.js","assets/VideoDiscovery-CyUYhTKL.js","assets/mountain-dJsdUizu.js","assets/map-pinned-DpIH41Hq.js","assets/UserProfile-CSiQHucB.js","assets/award-C2MYBTvh.js","assets/credit-card-B0XDcUdX.js","assets/GroupTrips-BFFvqKVN.js","assets/TripGroupDetail-dDvlSdrx.js","assets/circle-x-BO-W5S7j.js","assets/minus-XD6DbSup.js","assets/thumbs-down-DpKVNTtG.js","assets/GroupTripPage-CMQrP5n_.js","assets/GroupTripProposalPage-Db1P7tGy.js","assets/bus-C1fQ2ti_.js","assets/GroupTripSharePage-CjwWkdVO.js","assets/GroupTripStatusPage-jiezOxyU.js","assets/ScoutCheckin-Bj0RdZY8.js","assets/building-DF-y24pG.js","assets/SportsEvents-DcpE1IFg.js","assets/YouthSportsAdmin-C8KJsGYg.js","assets/BookingHub-DnW3q28z.js","assets/pen-83GDUi-V.js","assets/DirectBookingPanel-Dz0l1Q8a.js","assets/flightPassengerValidation-Kk4zx05c.js","assets/gift-CcGpxH7x.js","assets/react-stripe.esm-xOU6hUO5.js","assets/bell-off-BIWBf8w9.js","assets/Antioc
1hActivationPage-C4vZiLTS.js","assets/lock-keyhole-C6K8ocDf.js","assets/ItineraryBuilder-DwarzE3m.js","assets/isSameDay-5Yvz5Zvg.js","assets/subDays-BYbefwjR.js","assets/popover-Xcb99LU7.js","assets/rotate-ccw-BXkbHsdV.js","assets/index-CdNioXUL.js","assets/proxy-DEMj9hzd.js","assets/coffee-_u15ec5I.js","assets/sunset-AgnykwsY.js","assets/package-AjRnjGip.js","assets/landmark-BkbBMcHc.js","assets/PrivacySettings-ndYGlIG1.js","assets/ban-DCLU-RsO.js","assets/TermsOfServicePage-dastSXQx.js","assets/ChainExplorer-C8wBNT7U.js","assets/ChainCreateModal-DzbH-Ue8.js","assets/TrackingDisclosure-78Mp8TTf.js","assets/StopMedia-BwH1jfND.js","assets/stopMedia-Bh_Afahl.js","assets/network-BEQEgBu7.js","assets/pin-CfN4v5O6.js","assets/ChainDetail-Dlg14U3m.js","assets/CampaignOfferPanel-DCzIYjFg.js","assets/key-round-DDB3NZDv.js","assets/badge-check-CTqMqkJP.js","assets/ChainSmsJoinCard-Da34ke89.js","assets/settings-2-CKQWlrE-.js","assets/arrow-down-CHdaY5Vj.js","assets/useResilientWebSocket-DLEs5bEM.js","assets/wifi-D0nQ3Vrl.js","assets/shield-check-LwYRIJhL.js","assets/trending-down-Dsd0TGG8.js","assets/timer-DhqFX9ZZ.js","assets/ChainGroupChat-BtvPYw6B.js","assets/log-in-DrADV0ef.js","assets/shirt-DrRASvnL.js","assets/chainCapabilities-B-1iRMBp.js","assets/EmergencyButton-B9I0ZUBw.js","assets/shield-alert-Bj33tRge.js","assets/CertificatePage-D8zC1ftW.js","assets/ChainSlugRedirect-B1gC2aHn.js","assets/Wallet-ClotqESm.js","assets/piggy-bank-GWWx7iyl.js","assets/arrow-up-right-_tEZZH8K.js","assets/beer-Bw6boWpQ.js","assets/SlantLive-DjChSMos.js","assets/square-OOEZdkVC.js","assets/TravelerDashboard-CvVBkLAO.js","assets/Marketplace-BkLNjznC.js","assets/UnifiedDashboard-B83NWckK.js","assets/skull-qydTtyHA.js","assets/flame-Cpr2_ZoF.js","assets/OnboardingWizard-rKQIeecN.js","assets/circle-dot-D4s9IY7u.js","assets/HighlightReelStudio-UuQOZ9ed.js","assets/CreatorAnalyticsDashboard-B-A2qFRM.js","assets/arrow-down-right-ByzGt8di.js","assets/generateCategoricalChart-DZpWJM6e.js","assets/BarChart-DMhIEJ_f.js","assets/AreaChart-CihOxIpK.js","assets/CartesianGrid-Czk3FTe6.js","assets/BecomeCreator-Bu0Kj8C6.js","assets/PresaleDashboard-DRJ8aKrW.js","assets/mouse-pointer-click-CUquD_H1.js","assets/percent-BsbQn71u.js","assets/MerchantPortal-1s7kIChV.js","assets/CampaignPresaleLanding-BMMJfIRj.js","assets/PartnerPresaleLanding-d8yNuI2l.js","assets/MerchantQuickStart-CilowdFB.js","assets/NFLMadridDemo-DK83u_2E.js","assets/NFLEuropeHub-DjaJkNiT.js","assets/nflEurope-CzTDKijY.js","assets/ActivationMapSection-DGiIZK3H.js","assets/directions-BXI1NosT.js","assets/NFLEuropeCityPage-D1PFAdpN.js","assets/NFLEuropeMerchantJoin-CqD8yrcY.js","assets/clipboard-check-Bp-eM6Gx.js","assets/NFLEuropeCreatorBrief-CGnyNtTe.js","assets/chart-no-axes-column-BmSaB_RF.js","assets/NFLEuropeOps-C5cb7Eap.js","assets/NFLEuropePass-DLJhytTo.js","assets/NflCityLandingPage-BzCLvFi4.js","assets/SportEuropeMapPage-tKKw_exV.js","assets/PartnersPage-CZNG3hkX.js","assets/MRaaSPage-D5gtPDMV.js","assets/ProfessionalDirectory-CfBsdJPw.js","assets/ProfessionalProfile-BPPIrsmp.js","assets/circle-plus-BJGAS2Vo.js","assets/MRaaSAdminPage-B17ys93_.js","assets/table-Azv99rWQ.js","assets/MRaaSReportPage-BXHNl-fL.js","assets/printer-CCsSpADq.js","assets/MajorityReportLibrary-iIs6omXF.js","assets/FlywheelDiagram-BjUkq1yy.js","assets/FlywheelDiagram-CiEGrwXO.js","assets/businessModel-DVArq-HT.js","assets/PilotBrief-B_99Q-Bd.js","assets/LayerPresentation-Ct-h5aDy.js","assets/EventBrief-2ozCjIRg.js","assets/ConnectorModel-jeBHXgks.js","assets/OperatorBriefs-dE3RLi53.js","assets/RollingLoudDrop-CW-kgbY_.js","assets/ChainPlanAdoptPage-AzCsw2WH.js","assets/PresaleFastPass-BB0e908r.js","assets/MeninasTourPage-CvmzC4Qh.js","assets/WcMiamiPage-Cz50UXPu.js","assets/bed-double-153NU6qL.js","assets/PartnerGateway-DDMzANpx.js","assets/PartnerGatewayOps-XqHa98GR.js","assets/CreatorVolleyballDemo-Ct844Bih.js","assets/DemoVideoDownload-Dd8-_eGd.js","assets/AngelReeseDemo-CsV6ZPtL.js","assets/InfluenceTrackingDemo-BG7qnoXd.js","assets/QuickCutsDemoPage-CZoYf8HH.js","assets/QROnboarding-DkUPJuUI.js","assets/QRAuthLanding--IC-k57g.js","assets/CampaignOnboardingPage-NoPIg7mL.js","assets/InfluencerQRStudio-Em_Z8gaa.js","assets/EventsList-BEAjaqIW.js","assets/EventDetail-C0F0Gg52.js","assets/PitchDeck-B-7RWbSx.js","assets/KevinHartTourDemo-C4Nvo3Oq.js","assets/chart-line-I0lH8w3c.js","assets/LasVegasConferenceDemo-BioquK-Y.js","assets/shopping-cart-NbXXlIww.js","assets/presentation-HbYj88ka.js","assets/dumbbell-DZnb1ERg.js","assets/PharrellWilliamsDemo-DhihMHHp.js","assets/EventAgenda-Im9rOLLT.js","assets/AthleteChainJoin-TVQKCoI3.js","assets/ShareableDiscounts-DNP1nXgd.js","assets/differenceInDays-BCCXzjgq.js","assets/AthleteAnalytics-D9TKe124.js","assets/medal-By3lvNY2.js","assets/NILDashboard-C1hGveZI.js","assets/NILFollowPage-iBWnWVvA.js","assets/AthleteFanPage-Ce9V_olY.js","assets/CreatorOnboarding-AUcwscvm.js","assets/MyEvents-C_JXFvWp.js","assets/isToday-9Eb0_Uru.js","assets/SocialAccountsSett
1ings-6JptPCLd.js","assets/linkedin-DtZfu3uS.js","assets/PublicSlideViewer-DjrLi28R.js","assets/ProfileSettings-CP3W1R18.js","assets/QRLanding-7Z4LMDUt.js","assets/SimpleCreatorUpload-jtct6F63.js","assets/PublicAssetViewer-BruXxZOD.js","assets/RewardsPage-DkDsYdzN.js","assets/IdentityCapital-D4NkL_VB.js","assets/CeoAccessPage-CXKQB2eK.js","assets/CeoQrDisplay-T9ML5Rf-.js","assets/CannabisEventDemo-C0DzamT6.js","assets/leaf-C5b4RHoM.js","assets/graduation-cap-C79YMtsu.js","assets/EventExperience-C9Ypz4BC.js","assets/EventRegistration-DvOdRd1M.js","assets/EventRegistrationConfirmation-B1ycY0gd.js","assets/DirectMailDemo-Bf5ocWqp.js","assets/calendar-check-CHkio8MU.js","assets/ReadinessCheckIn-BtP-yRr9.js","assets/confetti.module-BJU5BvJN.js","assets/DestinationVideoDemo-CB5wh-Xr.js","assets/SlantRoutesPreview-BF1Y77D7.js","assets/MarquisBlakelyDemo-msqW20Ot.js","assets/Destinations-Dhyld-OD.js","assets/StaffRedemption-CJentAyT.js","assets/CampaignDashboard-BU3iLMLj.js","assets/CampaignPageSkeleton-Cf37wBDa.js","assets/TelemetryDashboard-CovuGOBD.js","assets/CampaignIntelligence-ChkxgdJn.js","assets/CampaignOpsPage-DXBHjhw7.js","assets/CreatorStudioAgentPage-CR0KUtiU.js","assets/clipboard-paste-DWZ_pqzv.js","assets/CreateChainWizardPage-aM4nLr2W.js","assets/StartChainPage-CmNx011Q.js","assets/ChainArrivalDashboardPage-akIfd4D8.js","assets/MaturityModelPage-CDkWRSkQ.js","assets/CreateCampaignPage-DxsJXSXa.js","assets/CampaignPriceInput-B9FuuOFw.js","assets/RadarCapabilityBanner-pF9FyfFZ.js","assets/crosshair-BVBYntMv.js","assets/TripPlannerPage-CXmfv5tc.js","assets/EditCampaignPage-DZfVs4VG.js","assets/CampaignBillingPage-B-u1w9wA.js","assets/CampaignDetailPage-UZtgxawL.js","assets/OfferList-BgWNkyAZ.js","assets/circle-minus-BqEYBzCe.js","assets/receipt-Dghr4o0I.js","assets/VenueClaimPage-C9GO9J1d.js","assets/StaffScannerPage-DIRr27TM.js","assets/keyboard-CPLZQZmm.js","assets/TicketDashboardPage-RcC6Mrac.js","assets/AdminTicketInventory-C6yB4OxA.js","assets/TicketSearchPage-BCfZrJEI.js","assets/TicketJobAid-CFtsIo4o.js","assets/NflEuropeAdScan-BLb8Y5YT.js","assets/NflEuropeAdSheet-DsuW22to.js","assets/MeninasAdSheet-B5RefUgv.js","assets/QASeedPanel-BJZwaHgn.js","assets/flask-conical-BzehFSAD.js","assets/TicketDetailPage-
1DMEOr81L.js","assets/TicketSuccessPage-DRC1mTCX.js","assets/GeofenceCreatePage-CQDYQtwt.js","assets/geofenceMapSync-DCh0-vGZ.js","assets/geofenceFormValidation-C9ZU9bDI.js","assets/GeofenceDetailPage-NEbmpfSe.js","assets/geofenceTracking-BhmDJhyf.js","assets/GeofenceEditPage-BMKCUlOX.js","assets/GeofenceListPage-BUqyFLVu.js","assets/CreatorRecognition-EddCMC3Z.js","assets/EventCreatorWizard-CszSJiyV.js","assets/EventHostHub-CYlcU1zT.js","assets/file-up-C705Cyun.js","assets/EventKitReview-CVyS_4H0.js","assets/EventManagement-B4iDwOm2.js","assets/layout-list-DaYCOpzJ.js","assets/EventCheckinScanner-LzXSwGH8.js","assets/EventAnalytics-CF_wJyzT.js","assets/ConnectorDashboard-L6vSbdgM.js","assets/ConnectorActivationForm-DDjnjY4h.js","assets/ConnectorReadiness-Dgc1y4de.js","assets/ReportsHub-CvzHqNzq.js","assets/CampaignReports-D4xLVIvD.js","assets/InvestorBriefs-BZ3e6n6E.js","assets/purify.es-BnINGy_Y.js","assets/ActivationGuides-CnVAknOq.js","assets/QrStudioPage-Bg7qtfXm.js","assets/QrChainPackStudio-DzfgZ2cF.js","assets/archive-kZQFnwm7.js","assets/TravelerPackView-CGGkvF1u.js","assets/ActivationReportPage-B5KEzXGP.js","assets/VenueChainLandingPage-Bc4IpoZN.js","assets/CashDropTicker-BWs2ubhz.js","assets/RbTourCityLanding-X2-lsoCp.js","assets/WristbandCheckinPage-q28_n6NS.js","assets/WristbandLandingPage-9FKeaOMb.js","assets/ActivationCalendarPage-BfMS2wBI.js","assets/ActivationMetricsDashboard-N6dJzqgz.js","assets/OutreachQueue-kAPjC2aK.js","assets/CreatorCoursePage-hzhHkmEI.js","assets/CreatorCourseLessonPage-DVHRyCwF.js","assets/CreatorCourseAssessmentPage-DIygoWel.js","assets/CreatorCourseCertificatePage-DEwKvY8B.js","assets/AdminCreatorCoursePage-BX4B1zRo.js","assets/CreatorActivationLanding-D1DM5S4U.js","assets/CreatorActivationHistory-vBGEkjxq.js","assets/CreatorFanTravelCampaign-naBdm5LT.js","assets/ScaledReportsPage-BNte9IUj.js","assets/ImpactDashboard-DjougB10.js","assets/StackingPage-DzwlFI6d.js","assets/MyStacksPage-DEIuZSPZ.js","assets/ImpactPortfolio-BLYpegeI.js","assets/AAUCityPage-nQECI0pU.js","assets/TripPlannerBridge-WXOQuwLO.js","assets/bed-BNYZu2lb.js","assets/AAUMerchantJoin-CQP7_OJe.js","assets/AAUCreatorBrief-CFyQ7_bD.js","assets/DmoDestinationPage-Ds-3uNg4.js","assets/DmoCreatorBrief-BIpGqrOb.js","assets/DmoMerchantJoin-bnzJO02K.js","assets/CreatorProfilePage-Cu8ldL9x.js","assets/CreatorStorefrontPage-DOUrodqr.js","assets/AllActiveChainsPage-BziKRxi-.js","assets/DmoWebhookPage-BRy2zcDS.js","assets/webhook-ERvdMqrb.js","assets/DmoDashboardPage-BaRO1jqH.js","assets/key-DHxFpKUB.js","assets/DmoEventRegisterPage-Dcg07weM.js","assets/DmoApplyPage-ChPbrUxf.js","assets/DmoDocsPage-DmaXNps3.js","assets/EventsDCPitch-McbU150R.js","assets/AAUAdmin-CP8xyNuV.js","assets/AuditLogAdmin-CZGmpBKS.js","assets/GygLinksAdmin-DOCdEato.js","assets/NBACityPage-QxOQ05Rt.js","assets/NBAAdmin-D0yebEWK.js","assets/NBAMerchantJoin-BrnzDmlB.js","assets/NBACreatorBrief-emXlbXq0.js","assets/NBAActivation-CYJmcbT9.js","assets/ConcertHub-BpVaP0BW.js","assets/ConcertEventPage-CuEmqbP0.js","assets/ConcertMerchantJoin-ZwjQKzVi.js","assets/ConcertCreatorBrief-oEJDJyaz.js","assets/ConcertActivation-7IthSuV5.js","assets/ConcertAdmin-Df-HJ7Mx.js","assets/ChainOpsAdminPage-Ch3KWdLp.js","assets/AASAdScan-Bhig0j7e.js","assets/AASAdSheet-Dya8BB0-.js","assets/AASHub-Du5w46IQ.js","assets/AASCreatorBrief-BxV6tNZJ.js","assets/AASMerchantJoin-CZw1E5M3.js","assets/AASQAGuide-DZgPry8I.js","assets/OktoberfestQAGuide-BUKseMXT.js","assets/RnbTourQAGuide-FaTvnUoH.js","assets/WimbledonQAGuide-tu4gwLv1.js","assets/AASStopCheckin-D-ewq6mO.js","assets/CFBHub-BUvn0YCy.js","assets/BookingOffersPanel-Cdpmd_CO.js","assets/CFBConferencePage-ZJ-MjEu4.js","assets/CFBTeamPage-C7nHVY06.js","assets/CFBGamePage-Bj4jjygj.js","assets/CFBAdminPage-C1v6k9jc.js","assets/NFLAwayHub-Cy-FKxHX.js","assets/NFLAwayDivisionPage-D5rNMPsX.js","assets/NFLAwayTeamPage-B4Ausfqz.js","assets/NFLAwayGamePage-LMLDtsVf.js","assets/NFLAwayAdminPage-CKNh6UfZ.js","assets/AwayLeaderboard-BokL8y2t.js","assets/LockInMerchPage-C_WaQXoV.js","assets/ConferenceSponsorAdminPage-DA03lb2n.js","assets/UniversityHub-B4W6Owku.js","assets/universities-ByQIZnqB.js","assets/UniversityPage-DpN1EWGV.js","assets/UniversityChainPage-TbizydnW.js","assets/PikeEnterprisePitch-BgcUGauL.js","assets/VermontPitchPage-CfI_hRFh.js","assets/NikePitch-B7dMLLc9.js","assets/signal-ysWCGfV1.js","assets/monitor-play-B0PTSP62.js","assets/JColePitch-DQcOSCZe.js","assets/LeBronPitch-CbQfjarb.js","assets/SabrinaPitch-DF3LzGoe.js","assets/JoriPitch-CYQyALAO.js","assets/MarqusPitch-BU7qYo7Y.js","assets/ActivationMarketingPlan-CEg0XOdI.js","assets/AdCreativeGuide
1-CKhzRLhm.js","assets/GroupDemandFlowPage-DivUGWTu.js","assets/RevenueForecast-DRBJlBO3.js","assets/SlantWallet-BAeXnLG7.js","assets/OperatorEarnings-D0LcbZb3.js","assets/ChainEarnings-AhOnIgSC.js","assets/OperatorCalculator-D4I9u7eA.js","assets/AdminShareMatrix-CyXWacqA.js","assets/MerchantStopDashboard-BGEQtzkl.js","assets/AdminWristbandOrders-CB7xZlhp.js","assets/truck-Ck4BOEFj.js","assets/WristbandJobAid-U_Pv3aTV.js","assets/EventReadinessConsole-1GsKQvE5.js","assets/AdminCelebrityStops-CdE9OGwm.js","assets/AdminCashDrops-8CvuE_Lw.js","assets/StandingPage-BlCkCtRj.js","assets/BookingPipelineHealth-BCufvNsN.js","assets/MadeHoopsROI-DH0coMt2.js","assets/CampaignScanLanding-vbIY-uk4.js","assets/PitchQR-C7T-eJfc.js","assets/PresaleOffers-DtsSxgcU.js","assets/SafetySettingsPage-CrSEB0rE.js","assets/SafetyMonitorPage-B00hC7XL.js","assets/GuardianConsentPage-BILW1JOn.js","assets/DelegationAcceptPage-BabMVaXR.js","assets/DelegationManagePage-DO-Hdi58.js","assets/SubchainIssuancePage-CaZQzpRJ.js","assets/DesignerSubchainPage-BKNQlO-I.js","assets/FlightSearchPage-DEuvSWW2.js","assets/PinCreatePage-BmtGe1qI.js","assets/PinPublicPage-DiXab6F8.js","assets/RestaurantPilotReport-CRZz-1f0.js","assets/SponsorPortalPage-CgezUMnj.js","assets/SubscriptionsPage-gGd_JdFd.js","assets/hammer-Dn3wGsOU.js","assets/SubscriptionsSuccessPage-DloIWpfc.js","assets/CreditStorePage-CEL_pthN.js","assets/RedeemPage-RZC3mjfu.js","assets/ActivationSupportForm-D6gcLwix.js","assets/EcosystemAdmin-BtIPLQ_O.js","assets/AthletesAbroadNetwork-ClJpZbNz.js","assets/CreatorListStudio-BYM7p5U9.js","assets/CCommerceDashboard-RhsWysJr.js","assets/BuilderDirectoryPage-CgaoEe91.js","assets/BuilderDetailPage-
vendor: 6,564 bytes, lines 1-10
1D8pQUnpH.js","assets/CertifiedPractitionerDirectoryPage-C83_Pl6Y.js","assets/CertifiedPractitionerDetailPage-DFOMZhfy.js","assets/BlueprintLibrary-CDF2mpqI.js","assets/StarterKitCataloguePage-q82PXTHC.js","assets/vote-Di-PL3wD.js","assets/EducatorResourcePackPage-hp-S_9G7.js","assets/EducatorSandboxPage-wp_X5Wxq.js","assets/clock-3-CX6ufBTS.js","assets/EducatorTermsPage-Cd7JThrA.js","assets/VoterInvitationPage-BLJldL2B.js","assets/VoterTurnoutAdminPage-CaHhGeXU.js","assets/AdminBlueprints-CVEmpi29.js","assets/AIOrchestratorDemoPage-mmw61X6D.js","assets/CertificationPage-DNTvbnJ2.js","assets/CertificationVerifyPage-BninSGeC.js","assets/CertificationAdminPage-DQIXsHYN.js","assets/CertifiedPartnerPage-Cc3GWQAy.js","assets/CertifiedPartnerSuccessPage-2U7ZiXbM.js","assets/CertifiedPartnerAdminPage-1HhGTHZ9.js","assets/PartnerOnboardingPage-B2eGvmM2.js","assets/AdminStanding-Bo648rPm.js","assets/AdminPartnerBenefits-CAwwRrZF.js"])))=>i.map(i=>d[i]);
2var MP=e=>{throw TypeError(e)};var gb=(e,r,s)=>r.has(e)||MP("Cannot "+s);var Te=(e,r,s)=>(gb(e,r,"read from private field"),s?s.call(e):r.get(e)),St=(e,r,s)=>r.has(e)?MP("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(e):r.set(e,s),dt=(e,r,s,u)=>(gb(e,r,"write to private field"),u?u.call(e,s):r.set(e,s),s),Ft=(e,r,s)=>(gb(e,r,"access private method"),s);var Jy=(e,r,s,u)=>({set _(m){dt(e,r,m,s)},get _(){return Te(e,r,u)}});function l4(e,r){for(var s=0;s<r.length;s++){const u=r[s];if(typeof u!="string"&&!Array.isArray(u)){for(const m in u)if(m!=="default"&&!(m in e)){const x=Object.getOwnPropertyDescriptor(u,m);x&&Object.defineProperty(e,m,x.get?x:{enumerable:!0,get:()=>u[m]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))u(m);new MutationObserver(m=>{for(const x of m)if(x.type==="childList")for(const v of x.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&u(v)}).observe(document,{childList:!0,subtree:!0});function s(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function u(m){if(m.ep)return;m.ep=!0;const x=s(m);fetch(m.href,x)}})();const c4="modulepreload",u4=function(e){return"/"+e},AP={},ae=function(r,s,u){let m=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const v=document.querySelector("meta[property=csp-nonce]"),c=(v==null?void 0:v.nonce)||(v==null?void 0:v.getAttribute("nonce"));m=Promise.allSettled(s.map(A=>{if(A=u4(A),A in AP)return;AP[A]=!0;const L=A.endsWith(".css"),z=L?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${A}"]${z}`))return;const j=document.createElement("link");if(j.rel=L?"stylesheet":c4,L||(j.as="script"),j.crossOrigin="",j.href=A,c&&j.setAttribute("nonce",c),document.head.appendChild(j),L)return new Promise((V,Z)=>{j.addEventListener("load",V),j.addEventListener("error",()=>Z(new Error(`Unable to preload CSS for ${A}`)))})}))}function x(v){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=v,window.dispatchEvent(c),!c.defaultPrevented)throw v}return m.then(v=>{for(const c of v||[])c.status==="rejected"&&x(c.reason);return r().catch(x)})};var d4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rA(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nA={exports:{}},Zv={},iA={exports:{}},Gt={};/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var ng=Symbol.for("react.element"),h4=Symbol.for("react.portal"),p4=Symbol.for("react.fragment"),f4=Symbol.for("react.strict_mode"),m4=Symbol.for("react.profiler"),g4=Symbol.for("react.provider"),y4=Symbol.for("react.context"),_4=Symbol.for("react.forward_ref"),v4=Symbol.for("react.suspense"),x4=Symbol.for("react.memo"),b4=Symbol.for("react.lazy"),RP=Symbol.iterator;function w4(e){return e===null||typeof e!="object"?null:(e=RP&&e[RP]||e["@@iterator"],typeof e=="function"?e:null)}var oA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sA=Object.assign,aA={};function up(e,r,s){this.props=e,this.context=r,this.refs=aA,this.updater=s||oA}up.prototype.isReactComponent={};up.prototype.setState=function(e,r){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,r,"setState")};up.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function lA(){}lA.prototype=up.prototype;function d2(e,r,s){this.props=e,this.context=r,this.refs=aA,this.updater=s||oA}var h2=d2.prototype=new lA;h2.constructor=d2;sA(h2,up.prototype);h2.isPureReactComponent=!0;var kP=Array.isArray,cA=Object.prototype.hasOwnProperty,p2={current:null},uA={key:!0,ref:!0,__self:!0,__source:!0};function dA(e,r,s){var u,m={},x=null,v=null;if(r!=null)for(u in r.ref!==void 0&&(v=r.ref),r.key!==void 0&&(x=""+r.key),r)cA.call(r,u)&&!uA.hasOwnProperty(u)&&(m[u]=r[u]);var c=arguments.length-2;if(c===1)m.children=s;else if(1<c){for(var A=Array(c),L=0;L<c;L++)A[L]=arguments[L+2];m.children=A}if(e&&e.defaultProps)for(u in c=e.defaultProps,c)m[u]===void 0&&(m[u]=c[u]);return{$$typeof:ng,type:e,key:x,ref:v,props:m,_owner:p2.current}}function S4(e,r){return{$$typeof:ng,type:e.type,key:r,ref:e.ref,props:e.props,_owner:e._owner}}function f2(e){return typeof e=="object"&&e!==null&&e.$$typeof===ng}function T4(e){var r={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(s){return r[s]})}var DP=/\/+/g;function yb(e,r){return typeof e=="object"&&e!==null&&e.key!=null?T4(""+e.key):r.toString(36)}function z_(e,r,s,u,m){var x=typeof e;(x==="undefined"||x==="boolean")&&(e=null);var v=!1;if(e===null)v=!0;else switch(x){case"string":case"number":v=!0;break;case"object":switch(e.$$typeof){case ng:case h4:v=!0}}if(v)return v=e,m=m(v),e=u===""?"."+yb(v,0):u,kP(m)?(s="",e!=null&&(s=e.replace(DP,"$&/")+"/"),z_(m,r,s,"",function(L){return L}
vendor: 4,447 bytes, lines 10-18
10)):m!=null&&(f2(m)&&(m=S4(m,s+(!m.key||v&&v.key===m.key?"":(""+m.key).replace(DP,"$&/")+"/")+e)),r.push(m)),1;if(v=0,u=u===""?".":u+":",kP(e))for(var c=0;c<e.length;c++){x=e[c];var A=u+yb(x,c);v+=z_(x,r,s,A,m)}else if(A=w4(e),typeof A=="function")for(e=A.call(e),c=0;!(x=e.next()).done;)x=x.value,A=u+yb(x,c++),v+=z_(x,r,s,A,m);else if(x==="object")throw r=String(e),Error("Objects are not valid as a React child (found: "+(r==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return v}function e_(e,r,s){if(e==null)return e;var u=[],m=0;return z_(e,u,"","",function(x){return r.call(s,x,m++)}),u}function E4(e){if(e._status===-1){var r=e._result;r=r(),r.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s)},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s)}),e._status===-1&&(e._status=0,e._result=r)}if(e._status===1)return e._result.default;throw e._result}var vi={current:null},O_={transition:null},P4={ReactCurrentDispatcher:vi,ReactCurrentBatchConfig:O_,ReactCurrentOwner:p2};function hA(){throw Error("act(...) is not supported in production builds of React.")}Gt.Children={map:e_,forEach:function(e,r,s){e_(e,function(){r.apply(this,arguments)},s)},count:function(e){var r=0;return e_(e,function(){r++}),r},toArray:function(e){return e_(e,function(r){return r})||[]},only:function(e){if(!f2(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Gt.Component=up;Gt.Fragment=p4;Gt.Profiler=m4;Gt.PureComponent=d2;Gt.StrictMode=f4;Gt.Suspense=v4;Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P4;Gt.act=hA;Gt.cloneElement=function(e,r,s){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var u=sA({},e.props),m=e.key,x=e.ref,v=e._owner;if(r!=null){if(r.ref!==void 0&&(x=r.ref,v=p2.current),r.key!==void 0&&(m=""+r.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(A in r)cA.call(r,A)&&!uA.hasOwnProperty(A)&&(u[A]=r[A]===void 0&&c!==void 0?c[A]:r[A])}var A=arguments.length-2;if(A===1)u.children=s;else if(1<A){c=Array(A);for(var L=0;L<A;L++)c[L]=arguments[L+2];u.children=c}return{$$typeof:ng,type:e.type,key:m,ref:x,props:u,_owner:v}};Gt.createContext=function(e){return e={$$typeof:y4,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:g4,_context:e},e.Consumer=e};Gt.createElement=dA;Gt.createFactory=function(e){var r=dA.bind(null,e);return r.type=e,r};Gt.createRef=function(){return{current:null}};Gt.forwardRef=function(e){return{$$typeof:_4,render:e}};Gt.isValidElement=f2;Gt.lazy=function(e){return{$$typeof:b4,_payload:{_status:-1,_result:e},_init:E4}};Gt.memo=function(e,r){return{$$typeof:x4,type:e,compare:r===void 0?null:r}};Gt.startTransition=function(e){var r=O_.transition;O_.transition={};try{e()}finally{O_.transition=r}};Gt.unstable_act=hA;Gt.useCallback=function(e,r){return vi.current.useCallback(e,r)};Gt.useContext=function(e){return vi.current.useContext(e)};Gt.useDebugValue=function(){};Gt.useDeferredValue=function(e){return vi.current.useDeferredValue(e)};Gt.useEffect=function(e,r){return vi.current.useEffect(e,r)};Gt.useId=function(){return vi.current.useId()};Gt.useImperativeHandle=function(e,r,s){return vi.current.useImperativeHandle(e,r,s)};Gt.useInsertionEffect=function(e,r){return vi.current.useInsertionEffect(e,r)};Gt.useLayoutEffect=function(e,r){return vi.current.useLayoutEffect(e,r)};Gt.useMemo=function(e,r){return vi.current.useMemo(e,r)};Gt.useReducer=function(e,r,s){return vi.current.useReducer(e,r,s)};Gt.useRef=function(e){return vi.current.useRef(e)};Gt.useState=function(e){return vi.current.useState(e)};Gt.useSyncExternalStore=function(e,r,s){return vi.current.useSyncExternalStore(e,r,s)};Gt.useTransition=function(){return vi.current.useTransition()};Gt.version="18.3.1";iA.exports=Gt;var R=iA.exports;const on=rA(R),Hv=l4({__proto__:null,default:on},[R]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var C4=R,I4=Symbol.for("react.element"),M4=Symbol.for("react.fragment"),A4=Object.prototype.hasOwnProperty,R4=C4.__SECRET_INT
vendor: 10,387 bytes, lines 18-34
18ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,k4={key:!0,ref:!0,__self:!0,__source:!0};function pA(e,r,s){var u,m={},x=null,v=null;s!==void 0&&(x=""+s),r.key!==void 0&&(x=""+r.key),r.ref!==void 0&&(v=r.ref);for(u in r)A4.call(r,u)&&!k4.hasOwnProperty(u)&&(m[u]=r[u]);if(e&&e.defaultProps)for(u in r=e.defaultProps,r)m[u]===void 0&&(m[u]=r[u]);return{$$typeof:I4,type:e,key:x,ref:v,props:m,_owner:R4.current}}Zv.Fragment=M4;Zv.jsx=pA;Zv.jsxs=pA;nA.exports=Zv;var M=nA.exports,fA={exports:{}},so={},mA={exports:{}},gA={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */(function(e){function r(Ae,Pe){var Ke=Ae.length;Ae.push(Pe);e:for(;0<Ke;){var ot=Ke-1>>>1,ze=Ae[ot];if(0<m(ze,Pe))Ae[ot]=Pe,Ae[Ke]=ze,Ke=ot;else break e}}function s(Ae){return Ae.length===0?null:Ae[0]}function u(Ae){if(Ae.length===0)return null;var Pe=Ae[0],Ke=Ae.pop();if(Ke!==Pe){Ae[0]=Ke;e:for(var ot=0,ze=Ae.length,Je=ze>>>1;ot<Je;){var mt=2*(ot+1)-1,ht=Ae[mt],Ct=mt+1,Tt=Ae[Ct];if(0>m(ht,Ke))Ct<ze&&0>m(Tt,ht)?(Ae[ot]=Tt,Ae[Ct]=Ke,ot=Ct):(Ae[ot]=ht,Ae[mt]=Ke,ot=mt);else if(Ct<ze&&0>m(Tt,Ke))Ae[ot]=Tt,Ae[Ct]=Ke,ot=Ct;else break e}}return Pe}function m(Ae,Pe){var Ke=Ae.sortIndex-Pe.sortIndex;return Ke!==0?Ke:Ae.id-Pe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var x=performance;e.unstable_now=function(){return x.now()}}else{var v=Date,c=v.now();e.unstable_now=function(){return v.now()-c}}var A=[],L=[],z=1,j=null,V=3,Z=!1,K=!1,Y=!1,ie=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function J(Ae){for(var Pe=s(L);Pe!==null;){if(Pe.callback===null)u(L);else if(Pe.startTime<=Ae)u(L),Pe.sortIndex=Pe.expirationTime,r(A,Pe);else break;Pe=s(L)}}function ue(Ae){if(Y=!1,J(Ae),!K)if(s(A)!==null)K=!0,Ze(ce);else{var Pe=s(L);Pe!==null&&We(ue,Pe.startTime-Ae)}}function ce(Ae,Pe){K=!1,Y&&(Y=!1,Q(Ce),Ce=-1),Z=!0;var Ke=V;try{for(J(Pe),j=s(A);j!==null&&(!(j.expirationTime>Pe)||Ae&&!ve());){var ot=j.callback;if(typeof ot=="function"){j.callback=null,V=j.priorityLevel;var ze=ot(j.expirationTime<=Pe);Pe=e.unstable_now(),typeof ze=="function"?j.callback=ze:j===s(A)&&u(A),J(Pe)}else u(A);j=s(A)}if(j!==null)var Je=!0;else{var mt=s(L);mt!==null&&We(ue,mt.startTime-Pe),Je=!1}return Je}finally{j=null,V=Ke,Z=!1}}var xe=!1,Re=null,Ce=-1,re=5,se=-1;function ve(){return!(e.unstable_now()-se<re)}function Me(){if(Re!==null){var Ae=e.unstable_now();se=Ae;var Pe=!0;try{Pe=Re(!0,Ae)}finally{Pe?qe():(xe=!1,Re=null)}}else xe=!1}var qe;if(typeof G=="function")qe=function(){G(Me)};else if(typeof MessageChannel<"u"){var $e=new MessageChannel,De=$e.port2;$e.port1.onmessage=Me,qe=function(){De.postMessage(null)}}else qe=function(){ie(Me,0)};function Ze(Ae){Re=Ae,xe||(xe=!0,qe())}function We(Ae,Pe){Ce=ie(function(){Ae(e.unstable_now())},Pe)}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(Ae){Ae.callback=null},e.unstable_continueExecution=function(){K||Z||(K=!0,Ze(ce))},e.unstable_forceFrameRate=function(Ae){0>Ae||125<Ae?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<Ae?Math.floor(1e3/Ae):5},e.unstable_getCurrentPriorityLevel=function(){return V},e.unstable_getFirstCallbackNode=function(){return s(A)},e.unstable_next=function(Ae){switch(V){case 1:case 2:case 3:var Pe=3;break;default:Pe=V}var Ke=V;V=Pe;try{return Ae()}finally{V=Ke}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Ae,Pe){switch(Ae){case 1:case 2:case 3:case 4:case 5:break;default:Ae=3}var Ke=V;V=Ae;try{return Pe()}finally{V=Ke}},e.unstable_scheduleCallback=function(Ae,Pe,Ke){var ot=e.unstable_now();switch(typeof Ke=="object"&&Ke!==null?(Ke=Ke.delay,Ke=typeof Ke=="number"&&0<Ke?ot+Ke:ot):Ke=ot,Ae){case 1:var ze=-1;break;case 2:ze=250;break;case 5:ze=1073741823;break;case 4:ze=1e4;break;default:ze=5e3}return ze=Ke+ze,Ae={id:z++,callback:Pe,priorityLevel:Ae,startTime:Ke,expirationTime:ze,sortIndex:-1},Ke>ot?(Ae.sortIndex=Ke,r(L,Ae),s(A)===null&&Ae===s(L)&&(Y?(Q(Ce),Ce=-1):Y=!0,We(ue,Ke-ot))):(Ae.sortIndex=ze,r(A,Ae),K||Z||(K=!0,Ze(ce))),Ae},e.unstable_shouldYield=ve,e.unstable_wrapCallback=function(Ae){var Pe=V;return function(){var Ke=V;V=Pe;try{return Ae.apply(this,arguments)}finally{V=Ke}}}})(gA);mA.exports=gA;var D4=mA.exports;/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var L4=R,oo=D4;function nt(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)r+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var yA=new Set,Cm={};function Lu(e,r){Kh(e,r),Kh(e+"Capture",r)}function Kh(e,r){for(Cm[e]=r,e=0;e<r.length;e++)yA.add(r[e])}var Ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),L1=Object.prototype.hasOwnProperty,z4=/^[: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]*$/,LP={},zP={};function O4(e){return L1.call(zP,e)?!0:L1.call(LP,e)?!1:z4.test(e)?zP[e]=!0:(LP[e]=!0,!1)}function F4(e,r,s,u){if(s!==null&&s.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return u?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j4(e,r,s,u){if(r===null||typeof r>"u"||F4(e,r,s,u))return!0;if(u)return!1;if(s!==null)switch(s.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function xi(e,r,s,u,m,x,v){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=u,this.attributeNamespace=m,this.mustUseProperty=s,this.propertyName=e,this.type=r,this.sanitizeURL=x,this.removeEmptyString=v}var Zn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Zn[e]=new xi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];Zn[r]=new xi(r,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Zn[e]=new xi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Zn[e]=new xi(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Zn[e]=new xi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Zn[e]=new xi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Zn[e]=new xi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Zn[e]=new xi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Zn[e]=new xi(e,5,!1,e.toLowerCase(),null,!1,!1)});var m2=/[\-:]([a-z])/g;function g2(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(m2,g2);Zn[r]=new xi(r,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(m2,g2);Zn[r]=new xi(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(m2,g2);Zn[r]=new xi(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Zn[e]=new xi(e,1,!1,e.toLowerCase(),null,!1,!1)});Zn.xlinkHref=new xi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Zn[e]=new xi(e,1,!1,e.toLowerCase(),null,!0,!0)});function y2(e,r,s,u){var m=Zn.hasOwnProperty(r)?Zn[r]:null;(m!==null?m.type!==0:u||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(j4(r,s,m,u)&&(s=null),u||m===null?O4(r)&&(s===null?e.removeAttribute(r):e.setAttribute(r,""+s)):m.mustUseProperty?e[m.propertyName]=s===null?m.type===3?!1:"":s:(r=m.attributeName,u=m.attributeNamespace,s===null?e.removeAttribute(r):(m=m.type,s=m
vendor: 5,024 bytes, lines 34-38
34===3||m===4&&s===!0?"":""+s,u?e.setAttributeNS(u,r,s):e.setAttribute(r,s))))}var Fa=L4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,t_=Symbol.for("react.element"),hh=Symbol.for("react.portal"),ph=Symbol.for("react.fragment"),_2=Symbol.for("react.strict_mode"),z1=Symbol.for("react.profiler"),_A=Symbol.for("react.provider"),vA=Symbol.for("react.context"),v2=Symbol.for("react.forward_ref"),O1=Symbol.for("react.suspense"),F1=Symbol.for("react.suspense_list"),x2=Symbol.for("react.memo"),Il=Symbol.for("react.lazy"),xA=Symbol.for("react.offscreen"),OP=Symbol.iterator;function Wf(e){return e===null||typeof e!="object"?null:(e=OP&&e[OP]||e["@@iterator"],typeof e=="function"?e:null)}var jr=Object.assign,_b;function cm(e){if(_b===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);_b=r&&r[1]||""}return`
35`+_b+e}var vb=!1;function xb(e,r){if(!e||vb)return"";vb=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(L){var u=L}Reflect.construct(e,[],r)}else{try{r.call()}catch(L){u=L}e.call(r.prototype)}else{try{throw Error()}catch(L){u=L}e()}}catch(L){if(L&&u&&typeof L.stack=="string"){for(var m=L.stack.split(`
36`),x=u.stack.split(`
37`),v=m.length-1,c=x.length-1;1<=v&&0<=c&&m[v]!==x[c];)c--;for(;1<=v&&0<=c;v--,c--)if(m[v]!==x[c]){if(v!==1||c!==1)do if(v--,c--,0>c||m[v]!==x[c]){var A=`
38`+m[v].replace(" at new "," at ");return e.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",e.displayName)),A}while(1<=v&&0<=c);break}}}finally{vb=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?cm(e):""}function N4(e){switch(e.tag){case 5:return cm(e.type);case 16:return cm("Lazy");case 13:return cm("Suspense");case 19:return cm("SuspenseList");case 0:case 2:case 15:return e=xb(e.type,!1),e;case 11:return e=xb(e.type.render,!1),e;case 1:return e=xb(e.type,!0),e;default:return""}}function j1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ph:return"Fragment";case hh:return"Portal";case z1:return"Profiler";case _2:return"StrictMode";case O1:return"Suspense";case F1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vA:return(e.displayName||"Context")+".Consumer";case _A:return(e._context.displayName||"Context")+".Provider";case v2:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case x2:return r=e.displayName||null,r!==null?r:j1(e.type)||"Memo";case Il:r=e._payload,e=e._init;try{return j1(e(r))}catch{}}return null}function B4(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return j1(r);case 8:return r===_2?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function tc(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bA(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function V4(e){var r=bA(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),u=""+e[r];if(!e.hasOwnProperty(r)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var m=s.get,x=s.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return m.call(this)},set:function(v){u=""+v,x.call(this,v)}}),Object.defineProperty(e,r,{enumerable:s.enumerable}),{getValue:function(){return u},setValue:function(v){u=""+v},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function r_(e){e._valueTracker||(e._valueTracker=V4(e))}function wA(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var s=r.getValue(),u="";return e&&(u=bA(e)?e.checked?"true":"false":e.value),e=u,e!==s?(r.setValue(e),!0):!1}function lv(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function N1(e,r){var s=r.checked;return jr({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function FP(e,r){var s=r.defaultValue==null?"":r.defaultValue,u=r.checked!=null?r.checked:r.defaultChecked;s=tc(r.value!=null?r.value:s),e._wrapperState={initialChecked:u,initialValue:s,
vendor: 4,738 bytes, line 38
38controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function SA(e,r){r=r.checked,r!=null&&y2(e,"checked",r,!1)}function B1(e,r){SA(e,r);var s=tc(r.value),u=r.type;if(s!=null)u==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(u==="submit"||u==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?V1(e,r.type,s):r.hasOwnProperty("defaultValue")&&V1(e,r.type,tc(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function jP(e,r,s){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var u=r.type;if(!(u!=="submit"&&u!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,s||r===e.value||(e.value=r),e.defaultValue=r}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function V1(e,r,s){(r!=="number"||lv(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var um=Array.isArray;function Eh(e,r,s,u){if(e=e.options,r){r={};for(var m=0;m<s.length;m++)r["$"+s[m]]=!0;for(s=0;s<e.length;s++)m=r.hasOwnProperty("$"+e[s].value),e[s].selected!==m&&(e[s].selected=m),m&&u&&(e[s].defaultSelected=!0)}else{for(s=""+tc(s),r=null,m=0;m<e.length;m++){if(e[m].value===s){e[m].selected=!0,u&&(e[m].defaultSelected=!0);return}r!==null||e[m].disabled||(r=e[m])}r!==null&&(r.selected=!0)}}function U1(e,r){if(r.dangerouslySetInnerHTML!=null)throw Error(nt(91));return jr({},r,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function NP(e,r){var s=r.value;if(s==null){if(s=r.children,r=r.defaultValue,s!=null){if(r!=null)throw Error(nt(92));if(um(s)){if(1<s.length)throw Error(nt(93));s=s[0]}r=s}r==null&&(r=""),s=r}e._wrapperState={initialValue:tc(s)}}function TA(e,r){var s=tc(r.value),u=tc(r.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),r.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),u!=null&&(e.defaultValue=""+u)}function BP(e){var r=e.textContent;r===e._wrapperState.initialValue&&r!==""&&r!==null&&(e.value=r)}function EA(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $1(e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?EA(r):e==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var n_,PA=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,s,u,m){MSApp.execUnsafeLocalFunction(function(){return e(r,s,u,m)})}:e}(function(e,r){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=r;else{for(n_=n_||document.createElement("div"),n_.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=n_.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Im(e,r){if(r){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=r;return}}e.textContent=r}var gm={animationIterationCount:!0,aspectRatio:!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},U4=["Webkit","ms","Moz","O"];Object.keys(gm).forEach(function(e){U4.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),gm[r]=gm[e]})});function CA(e,r,s){return r==null||typeof r=="boolean"||r===""?"":s||typeof r!="number"||r===0||gm.hasOwnProperty(e)&&gm[e]?(""+r).trim():r+"px"}function IA(e,r){e=e.style;for(var s in r)if(r.hasOwnProperty(s)){var u=s.indexOf("--")===0,m=CA(s,r[s],u);s==="float"&&(s="cssFloat"),u?e.setProperty(s,m):e[s]=m}}var $4=jr({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 G1(e,r){if(r){if($4[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(nt(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(nt(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(nt(61))}if(r.style!=null&&typeof r.style!="object")throw Error(nt(62))}}function q1(e,r){if(e.indexOf("-")===-1)return typeof r.is=="str
38ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var W1=null;function b2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Z1=null,Ph=null,Ch=null;function VP(e){if(e=sg(e)){if(typeof Z1!="function")throw Error(nt(280));var r=e.stateNode;r&&(r=Jv(r),Z1(e.stateNode,e.type,r))}}function MA(e){Ph?Ch?Ch.push(e):Ch=[e]:Ph=e}function AA(){if(Ph){var e=Ph,r=Ch;if(Ch=Ph=null,VP(e),r)for(e=0;e<r.length;e++)VP(r[e])}}function RA(e,r){return e(r)}function kA(){}var bb=!1;function DA(e,r,s){if(bb)return e(r,s);bb=!0;try{return RA(e,r,s)}finally{bb=!1,(Ph!==null||Ch!==null)&&(kA(),AA())}}function Mm(e,r){var s=e.stateNode;if(s===null)return null;var u=Jv(s);if(u===null)return null;s=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(nt(231,r,typeof s));return s}var H1=!1;if(Ra)try{var Zf={};Object.defineProperty(Zf,"passive",{get:function(){H1=!0}}),window.addEventListener("test",Zf,Zf),window.removeEventListener("test",Zf,Zf)}catch{H1=!1}function G4(e,r,s,u,m,x,v,c,A){var L=Array.prototype.slice.call(arguments,3);try{r.apply(s,L)}catch(z){this.onError(z)}}var ym=!1,cv=null,uv=!1,X1=null,q4={onError:function(e){ym=!0,cv=e}};function W4(e,r,s,u,m,x,v,c,A){ym=!1,cv=null,G4.apply(q4,arguments)}function Z4(e,r,s,u,m,x,v,c,A){if(W4.apply(this,arguments),ym){if(ym){var L=cv;ym=!1,cv=null}else throw Error(nt(198));uv||(uv=!0,X1=L)}}function zu(e){var r=e,s=e;if(e.alternate)for(;r.return;)r=r.return;else{e=r;do r=e,r.flags&4098&&(s=r.return),e=r.return;while(e)}return r.tag===3?s:null}function LA(e){if(e.tag===13){var r=e.memoizedState;if(r===null&&(e=e.alternate,e!==null&&(r=e.memoizedState)),r!==null)return r.dehydrated}return null}function UP(e){if(zu(e)!==e)throw Error(nt(188))}function H4(e){var r=e.alternate;if(!r){if(r=zu(e),r===null)throw Error(nt(188));return r!==e?null:e}for(var s=e,u=r;;){var m=s.return;if(m===null)break;var x=m.alternate;if(x===null){if(u=m.return,u!==null){s=u;continue}break}if(m.child===x.child){for(x=m.child;x;){if(x===s)return UP(m),e;if(x===u)return UP(m),r;x=x.sibling}throw Error(nt(188))}if(s.return!==u.return)s=m,u=x;else{for(var v=!1,c=m.child;c;){if(c===s){v=!0,s=m,u=x;break}if(c===u){v=!0,u=m,s=x;break}c=c.sibling}if(!v){for(c=x.child;c;){if(c===s){v=!0,s=x,u=m;break}if(c===u){v=!0,u=x,s=m;break}c=c.sibling}if(!v)throw Error(nt(189))}}if(s.alternate!==u)throw Error(nt(190))}if(s.tag!==3)throw Error(nt(188));return s.stateNode.current===s?e:r}function zA(e){return e=H4(e),e!==null?OA(e):null}function OA(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var r=OA(e);if(r!==null)return r;e=e.sibling}return null}var FA=oo.unstable_scheduleCallback,$P=oo.unstable_cancelCallback,X4=oo.unstable_shouldYield,K4=oo.unstable_requestPaint,Xr=oo.unstable_now,Y4
vendor: 5,942 bytes, line 38
38=oo.unstable_getCurrentPriorityLevel,w2=oo.unstable_ImmediatePriority,jA=oo.unstable_UserBlockingPriority,dv=oo.unstable_NormalPriority,Q4=oo.unstable_LowPriority,NA=oo.unstable_IdlePriority,Xv=null,Rs=null;function J4(e){if(Rs&&typeof Rs.onCommitFiberRoot=="function")try{Rs.onCommitFiberRoot(Xv,e,void 0,(e.current.flags&128)===128)}catch{}}var Xo=Math.clz32?Math.clz32:rj,ej=Math.log,tj=Math.LN2;function rj(e){return e>>>=0,e===0?32:31-(ej(e)/tj|0)|0}var i_=64,o_=4194304;function dm(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hv(e,r){var s=e.pendingLanes;if(s===0)return 0;var u=0,m=e.suspendedLanes,x=e.pingedLanes,v=s&268435455;if(v!==0){var c=v&~m;c!==0?u=dm(c):(x&=v,x!==0&&(u=dm(x)))}else v=s&~m,v!==0?u=dm(v):x!==0&&(u=dm(x));if(u===0)return 0;if(r!==0&&r!==u&&!(r&m)&&(m=u&-u,x=r&-r,m>=x||m===16&&(x&4194240)!==0))return r;if(u&4&&(u|=s&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=u;0<r;)s=31-Xo(r),m=1<<s,u|=e[s],r&=~m;return u}function nj(e,r){switch(e){case 1:case 2:case 4:return r+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ij(e,r){for(var s=e.suspendedLanes,u=e.pingedLanes,m=e.expirationTimes,x=e.pendingLanes;0<x;){var v=31-Xo(x),c=1<<v,A=m[v];A===-1?(!(c&s)||c&u)&&(m[v]=nj(c,r)):A<=r&&(e.expiredLanes|=c),x&=~c}}function K1(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function BA(){var e=i_;return i_<<=1,!(i_&4194240)&&(i_=64),e}function wb(e){for(var r=[],s=0;31>s;s++)r.push(e);return r}function ig(e,r,s){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-Xo(r),e[r]=s}function oj(e,r){var s=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var u=e.eventTimes;for(e=e.expirationTimes;0<s;){var m=31-Xo(s),x=1<<m;r[m]=0,u[m]=-1,e[m]=-1,s&=~x}}function S2(e,r){var s=e.entangledLanes|=r;for(e=e.entanglements;s;){var u=31-Xo(s),m=1<<u;m&r|e[u]&r&&(e[u]|=r),s&=~m}}var lr=0;function VA(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var UA,T2,$A,GA,qA,Y1=!1,s_=[],ql=null,Wl=null,Zl=null,Am=new Map,Rm=new Map,Al=[],sj="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function GP(e,r){switch(e){case"focusin":case"focusout":ql=null;break;case"dragenter":case"dragleave":Wl=null;break;case"mouseover":case"mouseout":Zl=null;break;case"pointerover":case"pointerout":Am.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rm.delete(r.pointerId)}}function Hf(e,r,s,u,m,x){return e===null||e.nativeEvent!==x?(e={blockedOn:r,domEventName:s,eventSystemFlags:u,nativeEvent:x,targetContainers:[m]},r!==null&&(r=sg(r),r!==null&&T2(r)),e):(e.eventSystemFlags|=u,r=e.targetContainers,m!==null&&r.indexOf(m)===-1&&r.push(m),e)}function aj(e,r,s,u,m){switch(r){case"focusin":return ql=Hf(ql,e,r,s,u,m),!0;case"dragenter":return Wl=Hf(Wl,e,r,s,u,m),!0;case"mouseover":return Zl=Hf(Zl,e,r,s,u,m),!0;case"pointerover":var x=m.pointerId;return Am.set(x,Hf(Am.get(x)||null,e,r,s,u,m)),!0;case"gotpointercapture":return x=m.pointerId,Rm.set(x,Hf(Rm.get(x)||null,e,r,s,u,m)),!0}return!1}function WA(e){var r=cu(e.target);if(r!==null){var s=zu(r);if(s!==null){if(r=s.tag,r===13){if(r=LA(s),r!==null){e.blockedOn=r,qA(e.priority,function(){$A(s)});return}}else if(r===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function F_(e){if(e.blockedOn!==null)return!1;for(var r=e.targetContainers;0<r.length;){var s=Q1(e.domEventName,e.eventSystemFlags,r[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var u=new s.constructor(s.type,s);W1=u,s.target.dispatchEvent(u),W1=null}else return r=sg(s),r!==null&&T2(r),e.blockedOn=s,!1;r.shift()}return!0}function qP(e,r,s){F_(e)&&s.delete(r)}function lj(){Y1=!1,ql!==null&&F_(ql)&&(ql=null),Wl!==null&&F_(Wl)&&(Wl=null),Zl!==null&&F_(Zl)&&(Zl=null),Am.forEach(qP),Rm.forEach(qP)}function Xf(e,r){e.blockedOn===r&&(e.blockedOn=null,Y1||(Y1=!0,oo.unstable_scheduleCallback(oo.unstable_NormalPriority,lj)))}function km(e){function r(m){return Xf(m,e)}if(0<s_.length){Xf(s_[0],e);for(var s=1;s<s_.length;s++){var u=s_[s];u.blockedOn===e&&(u.blockedOn=null)}}for(ql!==null&&Xf(ql,e),Wl!==null&&Xf(Wl,e),Zl!==null&&Xf(Zl,e),Am.forEach(r),Rm.forEach(r),s=0;s<Al.length;s++)u=Al[s],u.blockedOn===e&&(u.blockedOn=null);for(;0<Al.length&&(s=Al[0],s.blockedOn===null);)WA(s),s.blockedOn===null&&Al.shift()}var Ih=Fa.ReactCurrentBatchConfig,pv=!0;function cj(e,r,s,u){var m=lr,x=Ih.transition;Ih.transition=null;try{lr=1,E2(e,r,s,u)}finally{lr=m,Ih.transition=x}}function uj(e,r,s,u){var m=lr,x=Ih.transition;Ih.transition=null;try{lr=4,E2(e,r,s,u)}finally{lr=m,Ih.transition=x}}function E2(e,r,s,u){if(pv){var m=Q1(e,r,s,u);if(m===null)kb(e,r,u,fv,s),GP(e,u);else if(aj(m,e,r,s,u))u.stopPropagation();else if(GP(e,u),r&4&&-1<sj.indexOf(e)){for(;m!==null;){var x=sg(m);
vendor: 7,466 bytes, line 38
38if(x!==null&&UA(x),x=Q1(e,r,s,u),x===null&&kb(e,r,u,fv,s),x===m)break;m=x}m!==null&&u.stopPropagation()}else kb(e,r,u,null,s)}}var fv=null;function Q1(e,r,s,u){if(fv=null,e=b2(u),e=cu(e),e!==null)if(r=zu(e),r===null)e=null;else if(s=r.tag,s===13){if(e=LA(r),e!==null)return e;e=null}else if(s===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;e=null}else r!==e&&(e=null);return fv=e,null}function ZA(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Y4()){case w2:return 1;case jA:return 4;case dv:case Q4:return 16;case NA:return 536870912;default:return 16}default:return 16}}var Vl=null,P2=null,j_=null;function HA(){if(j_)return j_;var e,r=P2,s=r.length,u,m="value"in Vl?Vl.value:Vl.textContent,x=m.length;for(e=0;e<s&&r[e]===m[e];e++);var v=s-e;for(u=1;u<=v&&r[s-u]===m[x-u];u++);return j_=m.slice(e,1<u?1-u:void 0)}function N_(e){var r=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&r===13&&(e=13)):e=r,e===10&&(e=13),32<=e||e===13?e:0}function a_(){return!0}function WP(){return!1}function ao(e){function r(s,u,m,x,v){this._reactName=s,this._targetInst=m,this.type=u,this.nativeEvent=x,this.target=v,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(s=e[c],this[c]=s?s(x):x[c]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?a_:WP,this.isPropagationStopped=WP,this}return jr(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=a_)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=a_)},persist:function(){},isPersistent:a_}),r}var dp={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},C2=ao(dp),og=jr({},dp,{view:0,detail:0}),dj=ao(og),Sb,Tb,Kf,Kv=jr({},og,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:I2,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Kf&&(Kf&&e.type==="mousemove"?(Sb=e.screenX-Kf.screenX,Tb=e.screenY-Kf.screenY):Tb=Sb=0,Kf=e),Sb)},movementY:function(e){return"movementY"in e?e.movementY:Tb}}),ZP=ao(Kv),hj=jr({},Kv,{dataTransfer:0}),pj=ao(hj),fj=jr({},og,{relatedTarget:0}),Eb=ao(fj),mj=jr({},dp,{animationName:0,elapsedTime:0,pseudoElement:0}),gj=ao(mj),yj=jr({},dp,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_j=ao(yj),vj=jr({},dp,{data:0}),HP=ao(vj),xj={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bj={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"},wj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sj(e){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(e):(e=wj[e])?!!r[e]:!1}function I2(){return Sj}var Tj=jr({},og,{key:function(e){if(e.key){var r=xj[e.key]||e.key;if(r!=="Unidentified")return r}return e.type==="keypress"?(e=N_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bj[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:I2,charCode:function(e){return e.type==="keypress"?N_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?N_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ej=ao(Tj),Pj=jr({},Kv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),XP=ao(Pj),Cj=jr({},og,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:I2}),Ij=ao(Cj),Mj=jr({},dp,{propertyName:0,elapsedTime:0,pseudoElement:0}),Aj=ao(Mj),Rj=jr({},Kv,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kj=ao(Rj),Dj=[9,13,27,32],M2=Ra&&"CompositionEvent"in window,_m=null;Ra&&"documentMode"in document&&(_m=document.documentMode);var Lj=Ra&&"TextEvent"in window&&!_m,XA=Ra&&(!M2||_m&&8<_m&&11>=_m),KP=" ",YP=!1;function KA(e,r){switch(e){case"keyup":return Dj.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YA(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fh=!1;function zj(e,r){switch(e){case"compositionend":return YA(r);case"keypress":return r.which!==32?null:(YP=!0,KP);case"textInput":return e=r.data,e===KP&&YP?null:e;default:return null}}function Oj(e,r){if(fh)return e==="compositionend"||!M2&&KA(e,r)?(e=HA(),j_=P2=Vl=null,fh=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return XA&&r.locale!=="ko"?null:r.data;default:return null}}var Fj={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 QP(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r==="input"?!!Fj[e.type]:r==="textarea"}function QA(e,r,s,u){MA(u),r=mv(r,"onChange"),0<r.length&&(s=new C2("onChange","change",null,s,u),e.push({event:s,listeners:r}))}var vm=null,Dm=null;function jj(e){cR(e,0)}function Yv(e){var r=yh(e);if(wA(r))return e}function Nj(e,r){if(e==="change")return r}var JA=!1;if(Ra){var Pb;
vendor: 5,634 bytes, line 38
38if(Ra){var Cb="oninput"in document;if(!Cb){var JP=document.createElement("div");JP.setAttribute("oninput","return;"),Cb=typeof JP.oninput=="function"}Pb=Cb}else Pb=!1;JA=Pb&&(!document.documentMode||9<document.documentMode)}function eC(){vm&&(vm.detachEvent("onpropertychange",eR),Dm=vm=null)}function eR(e){if(e.propertyName==="value"&&Yv(Dm)){var r=[];QA(r,Dm,e,b2(e)),DA(jj,r)}}function Bj(e,r,s){e==="focusin"?(eC(),vm=r,Dm=s,vm.attachEvent("onpropertychange",eR)):e==="focusout"&&eC()}function Vj(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yv(Dm)}function Uj(e,r){if(e==="click")return Yv(r)}function $j(e,r){if(e==="input"||e==="change")return Yv(r)}function Gj(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var Qo=typeof Object.is=="function"?Object.is:Gj;function Lm(e,r){if(Qo(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;var s=Object.keys(e),u=Object.keys(r);if(s.length!==u.length)return!1;for(u=0;u<s.length;u++){var m=s[u];if(!L1.call(r,m)||!Qo(e[m],r[m]))return!1}return!0}function tC(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rC(e,r){var s=tC(e);e=0;for(var u;s;){if(s.nodeType===3){if(u=e+s.textContent.length,e<=r&&u>=r)return{node:s,offset:r-e};e=u}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=tC(s)}}function tR(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?tR(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function rR(){for(var e=window,r=lv();r instanceof e.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)e=r.contentWindow;else break;r=lv(e.document)}return r}function A2(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function qj(e){var r=rR(),s=e.focusedElem,u=e.selectionRange;if(r!==s&&s&&s.ownerDocument&&tR(s.ownerDocument.documentElement,s)){if(u!==null&&A2(s)){if(r=u.start,e=u.end,e===void 0&&(e=r),"selectionStart"in s)s.selectionStart=r,s.selectionEnd=Math.min(e,s.value.length);else if(e=(r=s.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var m=s.textContent.length,x=Math.min(u.start,m);u=u.end===void 0?x:Math.min(u.end,m),!e.extend&&x>u&&(m=u,u=x,x=m),m=rC(s,x);var v=rC(s,u);m&&v&&(e.rangeCount!==1||e.anchorNode!==m.node||e.anchorOffset!==m.offset||e.focusNode!==v.node||e.focusOffset!==v.offset)&&(r=r.createRange(),r.setStart(m.node,m.offset),e.removeAllRanges(),x>u?(e.addRange(r),e.extend(v.node,v.offset)):(r.setEnd(v.node,v.offset),e.addRange(r)))}}for(r=[],e=s;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<r.length;s++)e=r[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Wj=Ra&&"documentMode"in document&&11>=document.documentMode,mh=null,J1=null,xm=null,ew=!1;function nC(e,r,s){var u=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;ew||mh==null||mh!==lv(u)||(u=mh,"selectionStart"in u&&A2(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),xm&&Lm(xm,u)||(xm=u,u=mv(J1,"onSelect"),0<u.length&&(r=new C2("onSelect","select",null,r,s),e.push({event:r,listeners:u}),r.target=mh)))}function l_(e,r){var s={};return s[e.toLowerCase()]=r.toLowerCase(),s["Webkit"+e]="webkit"+r,s["Moz"+e]="moz"+r,s}var gh={animationend:l_("Animation","AnimationEnd"),animationiteration:l_("Animation","AnimationIteration"),animationstart:l_("Animation","AnimationStart"),transitionend:l_("Transition","TransitionEnd")},Ib={},nR={};Ra&&(nR=document.createElement("div").style,"AnimationEvent"in window||(delete gh.animationend.animation,delete gh.animationiteration.animation,delete gh.animationstart.animation),"TransitionEvent"in window||delete gh.transitionend.transition);function Qv(e){if(Ib[e])return Ib[e];if(!gh[e])return e;var r=gh[e],s;for(s in r)if(r.hasOwnProperty(s)&&s in nR)return Ib[e]=r[s];return e}var iR=Qv("animationend"),oR=Qv("animationiteration"),sR=Qv("animationstart"),aR=Qv("transitionend"),lR=new Map,iC="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function cc(e,r){lR.set(e,r),Lu(r,[e])}for(var Mb=0;Mb<iC.length;Mb++){var Ab=iC[Mb],Zj=Ab.toLowerCase(),Hj=Ab[0].toUpperCase()+Ab.slice(1);cc(Zj,"on"+Hj)}cc(iR,"onAnimationEnd");cc(oR,"onAnimationIteration");cc(sR,"onAnimationStart");cc("dblclick","onDoubleClick");cc("focusin","onFocus");cc("focusout","onBlur");cc(aR,"onTransitionEnd");Kh("onMouseEnter",["mouseout","mouseover"]);Kh("onMouseLeave",["mouseout","mouseover"]);Kh("onPointerEnter",["pointerout","pointerover"]);Kh("onPointerLeave",["pointerout","pointerover"]);Lu("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,796 bytes, line 38
38Lu("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Lu("onBeforeInput",["compositionend","keypress","textInput","paste"]);Lu("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Lu("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Lu("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hm="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xj=new Set("cancel close invalid load scroll toggle".split(" ").concat(hm));function oC(e,r,s){var u=e.type||"unknown-event";e.currentTarget=s,Z4(u,r,void 0,e),e.currentTarget=null}function cR(e,r){r=(r&4)!==0;for(var s=0;s<e.length;s++){var u=e[s],m=u.event;u=u.listeners;e:{var x=void 0;if(r)for(var v=u.length-1;0<=v;v--){var c=u[v],A=c.instance,L=c.currentTarget;if(c=c.listener,A!==x&&m.isPropagationStopped())break e;oC(m,c,L),x=A}else for(v=0;v<u.length;v++){if(c=u[v],A=c.instance,L=c.currentTarget,c=c.listener,A!==x&&m.isPropagationStopped())break e;oC(m,c,L),x=A}}}if(uv)throw e=X1,uv=!1,X1=null,e}function Cr(e,r){var s=r[ow];s===void 0&&(s=r[ow]=new Set);var u=e+"__bubble";s.has(u)||(uR(r,e,2,!1),s.add(u))}function Rb(e,r,s){var u=0;r&&(u|=4),uR(s,e,u,r)}var c_="_reactListening"+Math.random().toString(36).slice(2);function zm(e){if(!e[c_]){e[c_]=!0,yA.forEach(function(s){s!=="selectionchange"&&(Xj.has(s)||Rb(s,!1,e),Rb(s,!0,e))});var r=e.nodeType===9?e:e.ownerDocument;r===null||r[c_]||(r[c_]=!0,Rb("selectionchange",!1,r))}}function uR(e,r,s,u){switch(ZA(r)){case 1:var m=cj;break;case 4:m=uj;break;default:m=E2}s=m.bind(null,r,s,e),m=void 0,!H1||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(m=!0),u?m!==void 0?e.addEventListener(r,s,{capture:!0,passive:m}):e.addEventListener(r,s,!0):m!==void 0?e.addEventListener(r,s,{passive:m}):e.addEventListener(r,s,!1)}function kb(e,r,s,u,m){var x=u;if(!(r&1)&&!(r&2)&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var c=u.stateNode.containerInfo;if(c===m||c.nodeType===8&&c.parentNode===m)break;if(v===4)for(v=u.return;v!==null;){var A=v.tag;if((A===3||A===4)&&(A=v.stateNode.containerInfo,A===m||A.nodeType===8&&A.parentNode===m))return;v=v.return}for(;c!==null;){if(v=cu(c),v===null)return;if(A=v.tag,A===5||A===6){u=x=v;continue e}c=c.parentNode}}u=u.return}DA(function(){var L=x,z=b2(s),j=[];e:{var V=lR.get(e);if(V!==void 0){var Z=C2,K=e;switch(e){case"keypress":if(N_(s)===0)break e;case"keydown":case"keyup":Z=Ej;break;case"focusin":K="focus",Z=Eb;break;case"focusout":K="blur",Z=Eb;break;case"beforeblur":case"afterblur":Z=Eb;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=ZP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=pj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Ij;break;case iR:case oR:case sR:Z=gj;break;case aR:Z=Aj;break;case"scroll":Z=dj;break;case"wheel":Z=kj;break;case"copy":case"cut":case"paste":Z=_j;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=XP}var Y=(r&4)!==0,ie=!Y&&e==="scroll",Q=Y?V!==null?V+"Capture":null:V;Y=[];for(var G=L,J;G!==null;){J=G;var ue=J.stateNode;if(J.tag===5&&ue!==null&&(J=ue,Q!==null&&(ue=Mm(G,Q),ue!=null&&Y.push(Om(G,ue,J)))),ie)break;G=G.return}0<Y.length&&(V=new Z(V,K,null,s,z),j.push({event:V,listeners:Y}))}}if(!(r&7)){e:{if(V=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",V&&s!==W1&&(K=s.relatedTarget||s.fromElement)&&(cu(K)||K[ka]))break e;if((Z||V)&&(V=z.window===z?z:(V=z.ownerDocument)?V.defaultView||V.parentWindow:window,Z?(K=s.relatedTarget||s.toElement,Z=L,K=K?cu(K):null,K!==null&&(ie=zu(K),K!==ie||K.tag!==5&&K.tag!==6)&&(K=null)):(Z=null,K=L),Z!==K)){if(Y=ZP,ue="onMouseLeave",Q="onMouseEnter",G="mouse",(e==="pointerout"||e==="pointerover")&&(Y=XP,ue="onPointerLeave",Q="onPointerEnter",G="pointer"),ie=Z==null?V:yh(Z),J=K==null?V:yh(K),V=new Y(ue,G+"leave",Z,s,z),V.target=ie,V.relatedTarget=J,ue=null,cu(z)===L&&(Y=new Y(Q,G+"enter",K,s,z),Y.target=J,Y.relatedTarget=ie,ue=Y),ie=ue,Z&&K)t:{for(Y=Z,Q=K,G=0,J=Y;J;J=sh(J))G++;for(J=0,ue=Q;ue;ue=sh(ue))J++;for(;0<G-J;)Y=sh(Y),G--;for(;0<J-G;)Q=sh(Q),J--;for(;G--;){if(Y===Q||Q!==null&&Y===Q.alternate)break t;Y=sh(Y),Q=sh(Q)}Y=null}else Y=null;Z!==null&&sC(j,V,Z,Y,!1),K!==null&&ie!==null&&sC(j,ie,K,Y,!0)}}
vendor: 6,258 bytes, lines 38-39
38e:{if(V=L?yh(L):window,Z=V.nodeName&&V.nodeName.toLowerCase(),Z==="select"||Z==="input"&&V.type==="file")var ce=Nj;else if(QP(V))if(JA)ce=$j;else{ce=Vj;var xe=Bj}else(Z=V.nodeName)&&Z.toLowerCase()==="input"&&(V.type==="checkbox"||V.type==="radio")&&(ce=Uj);if(ce&&(ce=ce(e,L))){QA(j,ce,s,z);break e}xe&&xe(e,V,L),e==="focusout"&&(xe=V._wrapperState)&&xe.controlled&&V.type==="number"&&V1(V,"number",V.value)}switch(xe=L?yh(L):window,e){case"focusin":(QP(xe)||xe.contentEditable==="true")&&(mh=xe,J1=L,xm=null);break;case"focusout":xm=J1=mh=null;break;case"mousedown":ew=!0;break;case"contextmenu":case"mouseup":case"dragend":ew=!1,nC(j,s,z);break;case"selectionchange":if(Wj)break;case"keydown":case"keyup":nC(j,s,z)}var Re;if(M2)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else fh?KA(e,s)&&(Ce="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ce="onCompositionStart");Ce&&(XA&&s.locale!=="ko"&&(fh||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&fh&&(Re=HA()):(Vl=z,P2="value"in Vl?Vl.value:Vl.textContent,fh=!0)),xe=mv(L,Ce),0<xe.length&&(Ce=new HP(Ce,e,null,s,z),j.push({event:Ce,listeners:xe}),Re?Ce.data=Re:(Re=YA(s),Re!==null&&(Ce.data=Re)))),(Re=Lj?zj(e,s):Oj(e,s))&&(L=mv(L,"onBeforeInput"),0<L.length&&(z=new HP("onBeforeInput","beforeinput",null,s,z),j.push({event:z,listeners:L}),z.data=Re))}cR(j,r)})}function Om(e,r,s){return{instance:e,listener:r,currentTarget:s}}function mv(e,r){for(var s=r+"Capture",u=[];e!==null;){var m=e,x=m.stateNode;m.tag===5&&x!==null&&(m=x,x=Mm(e,s),x!=null&&u.unshift(Om(e,x,m)),x=Mm(e,r),x!=null&&u.push(Om(e,x,m))),e=e.return}return u}function sh(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sC(e,r,s,u,m){for(var x=r._reactName,v=[];s!==null&&s!==u;){var c=s,A=c.alternate,L=c.stateNode;if(A!==null&&A===u)break;c.tag===5&&L!==null&&(c=L,m?(A=Mm(s,x),A!=null&&v.unshift(Om(s,A,c))):m||(A=Mm(s,x),A!=null&&v.push(Om(s,A,c)))),s=s.return}v.length!==0&&e.push({event:r,listeners:v})}var Kj=/\r\n?/g,Yj=/\u0000|\uFFFD/g;function aC(e){return(typeof e=="string"?e:""+e).replace(Kj,`
39`).replace(Yj,"")}function u_(e,r,s){if(r=aC(r),aC(e)!==r&&s)throw Error(nt(425))}function gv(){}var tw=null,rw=null;function nw(e,r){return e==="textarea"||e==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var iw=typeof setTimeout=="function"?setTimeout:void 0,Qj=typeof clearTimeout=="function"?clearTimeout:void 0,lC=typeof Promise=="function"?Promise:void 0,Jj=typeof queueMicrotask=="function"?queueMicrotask:typeof lC<"u"?function(e){return lC.resolve(null).then(e).catch(eN)}:iw;function eN(e){setTimeout(function(){throw e})}function Db(e,r){var s=r,u=0;do{var m=s.nextSibling;if(e.removeChild(s),m&&m.nodeType===8)if(s=m.data,s==="/$"){if(u===0){e.removeChild(m),km(r);return}u--}else s!=="$"&&s!=="$?"&&s!=="$!"||u++;s=m}while(s);km(r)}function Hl(e){for(;e!=null;e=e.nextSibling){var r=e.nodeType;if(r===1||r===3)break;if(r===8){if(r=e.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return e}function cC(e){e=e.previousSibling;for(var r=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(r===0)return e;r--}else s==="/$"&&r++}e=e.previousSibling}return null}var hp=Math.random().toString(36).slice(2),Cs="__reactFiber$"+hp,Fm="__reactProps$"+hp,ka="__reactContainer$"+hp,ow="__reactEvents$"+hp,tN="__reactListeners$"+hp,rN="__reactHandles$"+hp;function cu(e){var r=e[Cs];if(r)return r;for(var s=e.parentNode;s;){if(r=s[ka]||s[Cs]){if(s=r.alternate,r.child!==null||s!==null&&s.child!==null)for(e=cC(e);e!==null;){if(s=e[Cs])return s;e=cC(e)}return r}e=s,s=e.parentNode}return null}function sg(e){return e=e[Cs]||e[ka],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yh(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(nt(33))}function Jv(e){return e[Fm]||null}var sw=[],_h=-1;function uc(e){return{current:e}}function Ir(e){0>_h||(e.current=sw[_h],sw[_h]=null,_h--)}function br(e,r){_h++,sw[_h]=e.current,e.current=r}var rc={},ii=uc(rc),Li=uc(!1),Eu=rc;function Yh(e,r){var s=e.type.contextTypes;if(!s)return rc;var u=e.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===r)return u.__reactInternalMemoizedMaskedChildContext;var m={},x;for(x in s)m[x]=r[x];return u&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=m),m}function zi(e){return e=e.childContextTypes,e!=null}function yv(){Ir(Li),Ir(ii)}function uC(e,r,s){if(ii.current!==rc)throw Error(nt(168));br(ii,r),br(Li,s)}function dR(e,r,s){var u=e.stateNode;if(r=r.childContextTypes,typeof u.getChildContext!="function")return s;u=u.getChildContext();for(var m in u)if(!(m in r))throw Error(nt(108,B4(e)||"Unknown",m));return jr({},s,u)}function _v(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||rc,Eu=ii.current,br(ii,e),br(Li,Li.current),!0}function dC(e,r,s){var u=e.stateNode;if(!u)throw Error(nt(169));s?(e=dR(e,r,Eu),u.__reactInternalMemoizedMergedChildContext=e,Ir(Li),Ir(ii),br(ii,e)):Ir(Li),br(Li,s)}var ba=null,e0=!1,Lb=!1;function hR(e){ba===null?ba=[e]:ba.push(e)}function nN(e){e0=!0,hR(e)}function dc(){if(!Lb&&ba!==null){Lb=!0;var e=0,r=lr;try{var s=ba;for(lr=1;e<s.length;e++){var u=s[e];do u=u(!0);while(u!==null)}ba=null,e0=!1}catch(m){throw ba!==null&&(ba=ba.slice(e+1)),FA(w2,dc),m}finally{lr=r,Lb=!1}}return null}var vh=[],xh=0,vv=null,xv=0,_o=[],vo=0,Pu=null,Ca=1,Ia="";function su(e,r){vh[xh++]=xv,vh[xh++]=vv,vv=e,xv=r}function pR(e,r,s){_o[vo++]=Ca,_o[vo++]=Ia,_o[vo++]=Pu,Pu=e;var u=Ca;e=Ia;var m=32-Xo(u)-1;u&=~(1<<m),s+=1;var x=32-Xo(r)+m;if(30<x){var v=m-m%5;x=(u&(1<<v)-1).toString(32),u>>=v,m-=v,Ca=1<<32-Xo(r)+m|s<<m|u,Ia=x+e}else Ca=1<<x|s<<m|u,Ia=e}function R2(e){e.return!==null&&(su(e,1),pR(e,1,0))}function k2(e){for(;e===vv;)vv=vh[--xh],vh[xh]=null,xv=vh[--xh],vh[xh]=null;for(;e===Pu;)Pu=_o[--vo],_o[vo]=null,Ia=_o[--vo],_o[vo]=null,Ca=_o[--vo],_o[vo]=null}var eo=null,Ji=null,kr=!1,Ho=null;function fR(e,r){var s=xo(5,null,null,0);
vendor: 4,447 bytes, line 39
39s.elementType="DELETED",s.stateNode=r,s.return=e,r=e.deletions,r===null?(e.deletions=[s],e.flags|=16):r.push(s)}function hC(e,r){switch(e.tag){case 5:var s=e.type;return r=r.nodeType!==1||s.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(e.stateNode=r,eo=e,Ji=Hl(r.firstChild),!0):!1;case 6:return r=e.pendingProps===""||r.nodeType!==3?null:r,r!==null?(e.stateNode=r,eo=e,Ji=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(s=Pu!==null?{id:Ca,overflow:Ia}:null,e.memoizedState={dehydrated:r,treeContext:s,retryLane:1073741824},s=xo(18,null,null,0),s.stateNode=r,s.return=e,e.child=s,eo=e,Ji=null,!0):!1;default:return!1}}function aw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function lw(e){if(kr){var r=Ji;if(r){var s=r;if(!hC(e,r)){if(aw(e))throw Error(nt(418));r=Hl(s.nextSibling);var u=eo;r&&hC(e,r)?fR(u,s):(e.flags=e.flags&-4097|2,kr=!1,eo=e)}}else{if(aw(e))throw Error(nt(418));e.flags=e.flags&-4097|2,kr=!1,eo=e}}}function pC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;eo=e}function d_(e){if(e!==eo)return!1;if(!kr)return pC(e),kr=!0,!1;var r;if((r=e.tag!==3)&&!(r=e.tag!==5)&&(r=e.type,r=r!=="head"&&r!=="body"&&!nw(e.type,e.memoizedProps)),r&&(r=Ji)){if(aw(e))throw mR(),Error(nt(418));for(;r;)fR(e,r),r=Hl(r.nextSibling)}if(pC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(nt(317));e:{for(e=e.nextSibling,r=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(r===0){Ji=Hl(e.nextSibling);break e}r--}else s!=="$"&&s!=="$!"&&s!=="$?"||r++}e=e.nextSibling}Ji=null}}else Ji=eo?Hl(e.stateNode.nextSibling):null;return!0}function mR(){for(var e=Ji;e;)e=Hl(e.nextSibling)}function Qh(){Ji=eo=null,kr=!1}function D2(e){Ho===null?Ho=[e]:Ho.push(e)}var iN=Fa.ReactCurrentBatchConfig;function Yf(e,r,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(nt(309));var u=s.stateNode}if(!u)throw Error(nt(147,e));var m=u,x=""+e;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===x?r.ref:(r=function(v){var c=m.refs;v===null?delete c[x]:c[x]=v},r._stringRef=x,r)}if(typeof e!="string")throw Error(nt(284));if(!s._owner)throw Error(nt(290,e))}return e}function h_(e,r){throw e=Object.prototype.toString.call(r),Error(nt(31,e==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":e))}function fC(e){var r=e._init;return r(e._payload)}function gR(e){function r(Q,G){if(e){var J=Q.deletions;J===null?(Q.deletions=[G],Q.flags|=16):J.push(G)}}function s(Q,G){if(!e)return null;for(;G!==null;)r(Q,G),G=G.sibling;return null}function u(Q,G){for(Q=new Map;G!==null;)G.key!==null?Q.set(G.key,G):Q.set(G.index,G),G=G.sibling;return Q}function m(Q,G){return Q=Ql(Q,G),Q.index=0,Q.sibling=null,Q}function x(Q,G,J){return Q.index=J,e?(J=Q.alternate,J!==null?(J=J.index,J<G?(Q.flags|=2,G):J):(Q.flags|=2,G)):(Q.flags|=1048576,G)}function v(Q){return e&&Q.alternate===null&&(Q.flags|=2),Q}function c(Q,G,J,ue){return G===null||G.tag!==6?(G=Vb(J,Q.mode,ue),G.return=Q,G):(G=m(G,J),G.return=Q,G)}function A(Q,G,J,ue){var ce=J.type;return ce===ph?z(Q,G,J.props.children,ue,J.key):G!==null&&(G.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Il&&fC(ce)===G.type)?(ue=m(G,J.props),ue.ref=Yf(Q,G,J),ue.return=Q,ue):(ue=W_(J.type,J.key,J.props,null,Q.mode,ue),ue.ref=Yf(Q,G,J),ue.return=Q,ue)}function L(Q,G,J,ue){return G===null||G.tag!==4||G.stateNode.containerInfo!==J.containerInfo||G.stateNode.implementation!==J.implementation?(G=Ub(J,Q.mode,ue),G.return=Q,G):(G=m(G,J.children||[]),G.return=Q,G)}function z(Q,G,J,ue,ce){return G===null||G.tag!==7?(G=Tu(J,Q.mode,ue,ce),G.return=Q,G):(G=m(G,J),G.return=Q,G)}function j(Q,G,J){if(typeof G=="string"&&G!==""||typeof G=="number")return G=Vb(""+G,Q.mode,J),G.return=Q,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case t_:return J=W_(G.type,G.key,G.props,null,Q.mode,J),J.ref=Yf(Q,null,G),J.return=Q,J;case hh:return G=Ub(G,Q.mode,J),G.return=Q,G;case Il:var ue=G._init;return j(Q,ue(G._payload),J)}if(um(G)||Wf(G))return G=Tu(G,Q.mode,J,null),G.return=Q,G;h_(Q,G)}return null}function V(Q,G,J,ue){var ce=G!==null?G.key:null;if(typeof J=="string"&&J!==""||typeof J=="number")return ce!==null?null:c(Q,G,""+J,ue);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case t_:return J.key===ce?A(Q,G,J,ue):null;case hh:return J.key===ce?L(Q,G,J,ue):null;case Il:return ce=J._init,V(Q,G,ce(J._payload),ue)}
vendor: 3,388 bytes, line 39
39if(um(J)||Wf(J))return ce!==null?null:z(Q,G,J,ue,null);h_(Q,J)}return null}function Z(Q,G,J,ue,ce){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return Q=Q.get(J)||null,c(G,Q,""+ue,ce);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case t_:return Q=Q.get(ue.key===null?J:ue.key)||null,A(G,Q,ue,ce);case hh:return Q=Q.get(ue.key===null?J:ue.key)||null,L(G,Q,ue,ce);case Il:var xe=ue._init;return Z(Q,G,J,xe(ue._payload),ce)}if(um(ue)||Wf(ue))return Q=Q.get(J)||null,z(G,Q,ue,ce,null);h_(G,ue)}return null}function K(Q,G,J,ue){for(var ce=null,xe=null,Re=G,Ce=G=0,re=null;Re!==null&&Ce<J.length;Ce++){Re.index>Ce?(re=Re,Re=null):re=Re.sibling;var se=V(Q,Re,J[Ce],ue);if(se===null){Re===null&&(Re=re);break}e&&Re&&se.alternate===null&&r(Q,Re),G=x(se,G,Ce),xe===null?ce=se:xe.sibling=se,xe=se,Re=re}if(Ce===J.length)return s(Q,Re),kr&&su(Q,Ce),ce;if(Re===null){for(;Ce<J.length;Ce++)Re=j(Q,J[Ce],ue),Re!==null&&(G=x(Re,G,Ce),xe===null?ce=Re:xe.sibling=Re,xe=Re);return kr&&su(Q,Ce),ce}for(Re=u(Q,Re);Ce<J.length;Ce++)re=Z(Re,Q,Ce,J[Ce],ue),re!==null&&(e&&re.alternate!==null&&Re.delete(re.key===null?Ce:re.key),G=x(re,G,Ce),xe===null?ce=re:xe.sibling=re,xe=re);return e&&Re.forEach(function(ve){return r(Q,ve)}),kr&&su(Q,Ce),ce}function Y(Q,G,J,ue){var ce=Wf(J);if(typeof ce!="function")throw Error(nt(150));if(J=ce.call(J),J==null)throw Error(nt(151));for(var xe=ce=null,Re=G,Ce=G=0,re=null,se=J.next();Re!==null&&!se.done;Ce++,se=J.next()){Re.index>Ce?(re=Re,Re=null):re=Re.sibling;var ve=V(Q,Re,se.value,ue);if(ve===null){Re===null&&(Re=re);break}e&&Re&&ve.alternate===null&&r(Q,Re),G=x(ve,G,Ce),xe===null?ce=ve:xe.sibling=ve,xe=ve,Re=re}if(se.done)return s(Q,Re),kr&&su(Q,Ce),ce;if(Re===null){for(;!se.done;Ce++,se=J.next())se=j(Q,se.value,ue),se!==null&&(G=x(se,G,Ce),xe===null?ce=se:xe.sibling=se,xe=se);return kr&&su(Q,Ce),ce}for(Re=u(Q,Re);!se.done;Ce++,se=J.next())se=Z(Re,Q,Ce,se.value,ue),se!==null&&(e&&se.alternate!==null&&Re.delete(se.key===null?Ce:se.key),G=x(se,G,Ce),xe===null?ce=se:xe.sibling=se,xe=se);return e&&Re.forEach(function(Me){return r(Q,Me)}),kr&&su(Q,Ce),ce}function ie(Q,G,J,ue){if(typeof J=="object"&&J!==null&&J.type===ph&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case t_:e:{for(var ce=J.key,xe=G;xe!==null;){if(xe.key===ce){if(ce=J.type,ce===ph){if(xe.tag===7){s(Q,xe.sibling),G=m(xe,J.props.children),G.return=Q,Q=G;break e}}else if(xe.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===Il&&fC(ce)===xe.type){s(Q,xe.sibling),G=m(xe,J.props),G.ref=Yf(Q,xe,J),G.return=Q,Q=G;break e}s(Q,xe);break}else r(Q,xe);xe=xe.sibling}J.type===ph?(G=Tu(J.props.children,Q.mode,ue,J.key),G.return=Q,Q=G):(ue=W_(J.type,J.key,J.props,null,Q.mode,ue),ue.ref=Yf(Q,G,J),ue.return=Q,Q=ue)}return v(Q);case hh:e:{for(xe=J.key;G!==null;){if(G.key===xe)if(G.tag===4&&G.stateNode.containerInfo===J.containerInfo&&G.stateNode.implementation===J.implementation){s(Q,G.sibling),G=m(G,J.children||[]),G.return=Q,Q=G;break e}else{s(Q,G);break}else r(Q,G);G=G.sibling}G=Ub(J,Q.mode,ue),G.return=Q,Q=G}return v(Q);case Il:return xe=J._init,ie(Q,G,xe(J._payload),ue)}if(um(J))return K(Q,G,J,ue);if(Wf(J))return Y(Q,G,J,ue);h_(Q,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,G!==null&&G.tag===6?(s(Q,G.sibling),G=m(G,J),G.return=Q,Q=G):(s(Q,G),G=Vb(J,Q.mode,ue),G.return=Q,Q=G),v(Q)):s(Q,G)}return ie}
vendor: 5,454 bytes, line 39
39var Jh=gR(!0),yR=gR(!1),bv=uc(null),wv=null,bh=null,L2=null;function z2(){L2=bh=wv=null}function O2(e){var r=bv.current;Ir(bv),e._currentValue=r}function cw(e,r,s){for(;e!==null;){var u=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),e===s)break;e=e.return}}function Mh(e,r){wv=e,L2=bh=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&r&&(Di=!0),e.firstContext=null)}function To(e){var r=e._currentValue;if(L2!==e)if(e={context:e,memoizedValue:r,next:null},bh===null){if(wv===null)throw Error(nt(308));bh=e,wv.dependencies={lanes:0,firstContext:e}}else bh=bh.next=e;return r}var uu=null;function F2(e){uu===null?uu=[e]:uu.push(e)}function _R(e,r,s,u){var m=r.interleaved;return m===null?(s.next=s,F2(r)):(s.next=m.next,m.next=s),r.interleaved=s,Da(e,u)}function Da(e,r){e.lanes|=r;var s=e.alternate;for(s!==null&&(s.lanes|=r),s=e,e=e.return;e!==null;)e.childLanes|=r,s=e.alternate,s!==null&&(s.childLanes|=r),s=e,e=e.return;return s.tag===3?s.stateNode:null}var Ml=!1;function j2(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vR(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ma(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Xl(e,r,s){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,Qt&2){var m=u.pending;return m===null?r.next=r:(r.next=m.next,m.next=r),u.pending=r,Da(e,s)}return m=u.interleaved,m===null?(r.next=r,F2(u)):(r.next=m.next,m.next=r),u.interleaved=r,Da(e,s)}function B_(e,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194240)!==0)){var u=r.lanes;u&=e.pendingLanes,s|=u,r.lanes=s,S2(e,s)}}function mC(e,r){var s=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,s===u)){var m=null,x=null;if(s=s.firstBaseUpdate,s!==null){do{var v={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};x===null?m=x=v:x=x.next=v,s=s.next}while(s!==null);x===null?m=x=r:x=x.next=r}else m=x=r;s={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:x,shared:u.shared,effects:u.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=r:e.next=r,s.lastBaseUpdate=r}function Sv(e,r,s,u){var m=e.updateQueue;Ml=!1;var x=m.firstBaseUpdate,v=m.lastBaseUpdate,c=m.shared.pending;if(c!==null){m.shared.pending=null;var A=c,L=A.next;A.next=null,v===null?x=L:v.next=L,v=A;var z=e.alternate;z!==null&&(z=z.updateQueue,c=z.lastBaseUpdate,c!==v&&(c===null?z.firstBaseUpdate=L:c.next=L,z.lastBaseUpdate=A))}if(x!==null){var j=m.baseState;v=0,z=L=A=null,c=x;do{var V=c.lane,Z=c.eventTime;if((u&V)===V){z!==null&&(z=z.next={eventTime:Z,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var K=e,Y=c;switch(V=r,Z=s,Y.tag){case 1:if(K=Y.payload,typeof K=="function"){j=K.call(Z,j,V);break e}j=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=Y.payload,V=typeof K=="function"?K.call(Z,j,V):K,V==null)break e;j=jr({},j,V);break e;case 2:Ml=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,V=m.effects,V===null?m.effects=[c]:V.push(c))}else Z={eventTime:Z,lane:V,tag:c.tag,payload:c.payload,callback:c.callback,next:null},z===null?(L=z=Z,A=j):z=z.next=Z,v|=V;if(c=c.next,c===null){if(c=m.shared.pending,c===null)break;V=c,c=V.next,V.next=null,m.lastBaseUpdate=V,m.shared.pending=null}}while(!0);if(z===null&&(A=j),m.baseState=A,m.firstBaseUpdate=L,m.lastBaseUpdate=z,r=m.shared.interleaved,r!==null){m=r;do v|=m.lane,m=m.next;while(m!==r)}else x===null&&(m.shared.lanes=0);Iu|=v,e.lanes=v,e.memoizedState=j}}function gC(e,r,s){if(e=r.effects,r.effects=null,e!==null)for(r=0;r<e.length;r++){var u=e[r],m=u.callback;if(m!==null){if(u.callback=null,u=s,typeof m!="function")throw Error(nt(191,m));m.call(u)}}}var ag={},ks=uc(ag),jm=uc(ag),Nm=uc(ag);function du(e){if(e===ag)throw Error(nt(174));return e}function N2(e,r){switch(br(Nm,r),br(jm,e),br(ks,ag),e=r.nodeType,e){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:$1(null,"");break;default:e=e===8?r.parentNode:r,r=e.namespaceURI||null,e=e.tagName,r=$1(r,e)}Ir(ks),br(ks,r)}function ep(){Ir(ks),Ir(jm),Ir(Nm)}function xR(e){du(Nm.current);var r=du(ks.current),s=$1(r,e.type);r!==s&&(br(jm,e),br(ks,s))}function B2(e){jm.current===e&&(Ir(ks),Ir(jm))}var Or=uc(0);function Tv(e){for(var r=e;r!==null;){if(r.tag===13){var s=r.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var zb=[];function V2(){for(var e=0;e<zb.length;e++)zb[e]._workInProgressVersionPrimary=null;zb.length=0}var V_=Fa.ReactCurrentDispatcher,Ob=Fa.ReactCurrentBatchConfig,Cu=0,Fr=null,gn=null,kn=null,Ev=!1,bm=!1,Bm=0,oN=0;function ei(){throw Error(nt(321))}function U2(e,r){if(r===null)return!1;for(var s=0;s<r.length&&s<e.length;s++)if(!Qo(e[s],r[s]))return!1;return!0}function $2(e,r,s,u,m,x){if(Cu=x,Fr=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,V_.current=e===null||e.memoizedState===null?cN:uN,e=s(u,m),bm){x=0;
vendor: 4,742 bytes, line 39
39do{if(bm=!1,Bm=0,25<=x)throw Error(nt(301));x+=1,kn=gn=null,r.updateQueue=null,V_.current=dN,e=s(u,m)}while(bm)}if(V_.current=Pv,r=gn!==null&&gn.next!==null,Cu=0,kn=gn=Fr=null,Ev=!1,r)throw Error(nt(300));return e}function G2(){var e=Bm!==0;return Bm=0,e}function Ss(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kn===null?Fr.memoizedState=kn=e:kn=kn.next=e,kn}function Eo(){if(gn===null){var e=Fr.alternate;e=e!==null?e.memoizedState:null}else e=gn.next;var r=kn===null?Fr.memoizedState:kn.next;if(r!==null)kn=r,gn=e;else{if(e===null)throw Error(nt(310));gn=e,e={memoizedState:gn.memoizedState,baseState:gn.baseState,baseQueue:gn.baseQueue,queue:gn.queue,next:null},kn===null?Fr.memoizedState=kn=e:kn=kn.next=e}return kn}function Vm(e,r){return typeof r=="function"?r(e):r}function Fb(e){var r=Eo(),s=r.queue;if(s===null)throw Error(nt(311));s.lastRenderedReducer=e;var u=gn,m=u.baseQueue,x=s.pending;if(x!==null){if(m!==null){var v=m.next;m.next=x.next,x.next=v}u.baseQueue=m=x,s.pending=null}if(m!==null){x=m.next,u=u.baseState;var c=v=null,A=null,L=x;do{var z=L.lane;if((Cu&z)===z)A!==null&&(A=A.next={lane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),u=L.hasEagerState?L.eagerState:e(u,L.action);else{var j={lane:z,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null};A===null?(c=A=j,v=u):A=A.next=j,Fr.lanes|=z,Iu|=z}L=L.next}while(L!==null&&L!==x);A===null?v=u:A.next=c,Qo(u,r.memoizedState)||(Di=!0),r.memoizedState=u,r.baseState=v,r.baseQueue=A,s.lastRenderedState=u}if(e=s.interleaved,e!==null){m=e;do x=m.lane,Fr.lanes|=x,Iu|=x,m=m.next;while(m!==e)}else m===null&&(s.lanes=0);return[r.memoizedState,s.dispatch]}function jb(e){var r=Eo(),s=r.queue;if(s===null)throw Error(nt(311));s.lastRenderedReducer=e;var u=s.dispatch,m=s.pending,x=r.memoizedState;if(m!==null){s.pending=null;var v=m=m.next;do x=e(x,v.action),v=v.next;while(v!==m);Qo(x,r.memoizedState)||(Di=!0),r.memoizedState=x,r.baseQueue===null&&(r.baseState=x),s.lastRenderedState=x}return[x,u]}function bR(){}function wR(e,r){var s=Fr,u=Eo(),m=r(),x=!Qo(u.memoizedState,m);if(x&&(u.memoizedState=m,Di=!0),u=u.queue,q2(ER.bind(null,s,u,e),[e]),u.getSnapshot!==r||x||kn!==null&&kn.memoizedState.tag&1){if(s.flags|=2048,Um(9,TR.bind(null,s,u,m,r),void 0,null),Dn===null)throw Error(nt(349));Cu&30||SR(s,r,m)}return m}function SR(e,r,s){e.flags|=16384,e={getSnapshot:r,value:s},r=Fr.updateQueue,r===null?(r={lastEffect:null,stores:null},Fr.updateQueue=r,r.stores=[e]):(s=r.stores,s===null?r.stores=[e]:s.push(e))}function TR(e,r,s,u){r.value=s,r.getSnapshot=u,PR(r)&&CR(e)}function ER(e,r,s){return s(function(){PR(r)&&CR(e)})}function PR(e){var r=e.getSnapshot;e=e.value;try{var s=r();return!Qo(e,s)}catch{return!0}}function CR(e){var r=Da(e,1);r!==null&&Ko(r,e,1,-1)}function yC(e){var r=Ss();return typeof e=="function"&&(e=e()),r.memoizedState=r.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vm,lastRenderedState:e},r.queue=e,e=e.dispatch=lN.bind(null,Fr,e),[r.memoizedState,e]}function Um(e,r,s,u){return e={tag:e,create:r,destroy:s,deps:u,next:null},r=Fr.updateQueue,r===null?(r={lastEffect:null,stores:null},Fr.updateQueue=r,r.lastEffect=e.next=e):(s=r.lastEffect,s===null?r.lastEffect=e.next=e:(u=s.next,s.next=e,e.next=u,r.lastEffect=e)),e}function IR(){return Eo().memoizedState}function U_(e,r,s,u){var m=Ss();Fr.flags|=e,m.memoizedState=Um(1|r,s,void 0,u===void 0?null:u)}function t0(e,r,s,u){var m=Eo();u=u===void 0?null:u;var x=void 0;if(gn!==null){var v=gn.memoizedState;if(x=v.destroy,u!==null&&U2(u,v.deps)){m.memoizedState=Um(r,s,x,u);return}}Fr.flags|=e,m.memoizedState=Um(1|r,s,x,u)}function _C(e,r){return U_(8390656,8,e,r)}function q2(e,r){return t0(2048,8,e,r)}function MR(e,r){return t0(4,2,e,r)}function AR(e,r){return t0(4,4,e,r)}function RR(e,r){if(typeof r=="function")return e=e(),r(e),function(){r(null)};if(r!=null)return e=e(),r.current=e,function(){r.current=null}}function kR(e,r,s){return s=s!=null?s.concat([e]):null,t0(4,4,RR.bind(null,r,e),s)}function W2(){}function DR(e,r){var s=Eo();r=r===void 0?null:r;var u=s.memoizedState;return u!==null&&r!==null&&U2(r,u[1])?u[0]:(s.memoizedState=[e,r],e)}function LR(e,r){var s=Eo();r=r===void 0?null:r;var u=s.memoizedState;return u!==null&&r!==null&&U2(r,u[1])?u[0]:(e=e(),s.memoizedState=[e,r],e)}function zR(e,r,s){return Cu&21?(Qo(s,r)||(s=BA(),Fr.lanes|=s,Iu|=s,e.baseState=!0),r):(e.baseState&&(e.baseState=!1,Di=!0),e.memoizedState=s)}function sN(e,r){var s=lr;lr=s!==0&&4>s?s:4,e(!0);var u=Ob.transition;Ob.transition={};try{e(!1),r()}finally{lr=s,Ob.transition=u}}function OR(){return Eo().memoizedState}function aN(e,r,s){var u=Yl(e);
vendor: 10,215 bytes, lines 39-41
39if(s={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null},FR(e))jR(r,s);else if(s=_R(e,r,s,u),s!==null){var m=yi();Ko(s,e,u,m),NR(s,r,u)}}function lN(e,r,s){var u=Yl(e),m={lane:u,action:s,hasEagerState:!1,eagerState:null,next:null};if(FR(e))jR(r,m);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=r.lastRenderedReducer,x!==null))try{var v=r.lastRenderedState,c=x(v,s);if(m.hasEagerState=!0,m.eagerState=c,Qo(c,v)){var A=r.interleaved;A===null?(m.next=m,F2(r)):(m.next=A.next,A.next=m),r.interleaved=m;return}}catch{}finally{}s=_R(e,r,m,u),s!==null&&(m=yi(),Ko(s,e,u,m),NR(s,r,u))}}function FR(e){var r=e.alternate;return e===Fr||r!==null&&r===Fr}function jR(e,r){bm=Ev=!0;var s=e.pending;s===null?r.next=r:(r.next=s.next,s.next=r),e.pending=r}function NR(e,r,s){if(s&4194240){var u=r.lanes;u&=e.pendingLanes,s|=u,r.lanes=s,S2(e,s)}}var Pv={readContext:To,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useInsertionEffect:ei,useLayoutEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useMutableSource:ei,useSyncExternalStore:ei,useId:ei,unstable_isNewReconciler:!1},cN={readContext:To,useCallback:function(e,r){return Ss().memoizedState=[e,r===void 0?null:r],e},useContext:To,useEffect:_C,useImperativeHandle:function(e,r,s){return s=s!=null?s.concat([e]):null,U_(4194308,4,RR.bind(null,r,e),s)},useLayoutEffect:function(e,r){return U_(4194308,4,e,r)},useInsertionEffect:function(e,r){return U_(4,2,e,r)},useMemo:function(e,r){var s=Ss();return r=r===void 0?null:r,e=e(),s.memoizedState=[e,r],e},useReducer:function(e,r,s){var u=Ss();return r=s!==void 0?s(r):r,u.memoizedState=u.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},u.queue=e,e=e.dispatch=aN.bind(null,Fr,e),[u.memoizedState,e]},useRef:function(e){var r=Ss();return e={current:e},r.memoizedState=e},useState:yC,useDebugValue:W2,useDeferredValue:function(e){return Ss().memoizedState=e},useTransition:function(){var e=yC(!1),r=e[0];return e=sN.bind(null,e[1]),Ss().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,s){var u=Fr,m=Ss();if(kr){if(s===void 0)throw Error(nt(407));s=s()}else{if(s=r(),Dn===null)throw Error(nt(349));Cu&30||SR(u,r,s)}m.memoizedState=s;var x={value:s,getSnapshot:r};return m.queue=x,_C(ER.bind(null,u,x,e),[e]),u.flags|=2048,Um(9,TR.bind(null,u,x,s,r),void 0,null),s},useId:function(){var e=Ss(),r=Dn.identifierPrefix;if(kr){var s=Ia,u=Ca;s=(u&~(1<<32-Xo(u)-1)).toString(32)+s,r=":"+r+"R"+s,s=Bm++,0<s&&(r+="H"+s.toString(32)),r+=":"}else s=oN++,r=":"+r+"r"+s.toString(32)+":";return e.memoizedState=r},unstable_isNewReconciler:!1},uN={readContext:To,useCallback:DR,useContext:To,useEffect:q2,useImperativeHandle:kR,useInsertionEffect:MR,useLayoutEffect:AR,useMemo:LR,useReducer:Fb,useRef:IR,useState:function(){return Fb(Vm)},useDebugValue:W2,useDeferredValue:function(e){var r=Eo();return zR(r,gn.memoizedState,e)},useTransition:function(){var e=Fb(Vm)[0],r=Eo().memoizedState;return[e,r]},useMutableSource:bR,useSyncExternalStore:wR,useId:OR,unstable_isNewReconciler:!1},dN={readContext:To,useCallback:DR,useContext:To,useEffect:q2,useImperativeHandle:kR,useInsertionEffect:MR,useLayoutEffect:AR,useMemo:LR,useReducer:jb,useRef:IR,useState:function(){return jb(Vm)},useDebugValue:W2,useDeferredValue:function(e){var r=Eo();return gn===null?r.memoizedState=e:zR(r,gn.memoizedState,e)},useTransition:function(){var e=jb(Vm)[0],r=Eo().memoizedState;return[e,r]},useMutableSource:bR,useSyncExternalStore:wR,useId:OR,unstable_isNewReconciler:!1};function qo(e,r){if(e&&e.defaultProps){r=jr({},r),e=e.defaultProps;for(var s in e)r[s]===void 0&&(r[s]=e[s]);return r}return r}function uw(e,r,s,u){r=e.memoizedState,s=s(u,r),s=s==null?r:jr({},r,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var r0={isMounted:function(e){return(e=e._reactInternals)?zu(e)===e:!1},enqueueSetState:function(e,r,s){e=e._reactInternals;var u=yi(),m=Yl(e),x=Ma(u,m);x.payload=r,s!=null&&(x.callback=s),r=Xl(e,x,m),r!==null&&(Ko(r,e,m,u),B_(r,e,m))},enqueueReplaceState:function(e,r,s){e=e._reactInternals;var u=yi(),m=Yl(e),x=Ma(u,m);x.tag=1,x.payload=r,s!=null&&(x.callback=s),r=Xl(e,x,m),r!==null&&(Ko(r,e,m,u),B_(r,e,m))},enqueueForceUpdate:function(e,r){e=e._reactInternals;var s=yi(),u=Yl(e),m=Ma(s,u);m.tag=2,r!=null&&(m.callback=r),r=Xl(e,m,u),r!==null&&(Ko(r,e,u,s),B_(r,e,u))}};function vC(e,r,s,u,m,x,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,x,v):r.prototype&&r.prototype.isPureReactComponent?!Lm(s,u)||!Lm(m,x):!0}function BR(e,r,s){var u=!1,m=rc,x=r.contextType;return typeof x=="object"&&x!==null?x=To(x):(m=zi(r)?Eu:ii.current,u=r.contextTypes,x=(u=u!=null)?Yh(e,m):rc),r=new r(s,x),e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=r0,e.stateNode=r,r._reactInternals=e,u&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=m,e.__reactInternalMemoizedMaskedChildContext=x),r}function xC(e,r,s,u){e=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(s,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(s,u),r.state!==e&&r0.enqueueReplaceState(r,r.state,null)}function dw(e,r,s,u){var m=e.stateNode;m.props=s,m.state=e.memoizedState,m.refs={},j2(e);var x=r.contextType;typeof x=="object"&&x!==null?m.context=To(x):(x=zi(r)?Eu:ii.current,m.context=Yh(e,x)),m.state=e.memoizedState,x=r.getDerivedStateFromProps,typeof x=="function"&&(uw(e,r,x,s),m.state=e.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(r=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),r!==m.state&&r0.enqueueReplaceState(m,m.state,null),Sv(e,s,m,u),m.state=e.memoizedState),typeof m.componentDidMount=="function"&&(e.flags|=4194308)}function tp(e,r){try{var s="",u=r;do s+=N4(u),u=u.return;while(u);var m=s}catch(x){m=`
40Error generating stack: `+x.message+`
41`+x.stack}return{value:e,source:r,stack:m,digest:null}}function Nb(e,r,s){return{value:e,source:null,stack:s??null,digest:r??null}}function hw(e,r){try{console.error(r.value)}catch(s){setTimeout(function(){throw s})}}var hN=typeof WeakMap=="function"?WeakMap:Map;function VR(e,r,s){s=Ma(-1,s),s.tag=3,s.payload={element:null};var u=r.value;return s.callback=function(){Iv||(Iv=!0,ww=u),hw(e,r)},s}function UR(e,r,s){s=Ma(-1,s),s.tag=3;var u=e.type.getDerivedStateFromError;if(typeof u=="function"){var m=r.value;s.payload=function(){return u(m)},s.callback=function(){hw(e,r)}}var x=e.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(s.callback=function(){hw(e,r),typeof u!="function"&&(Kl===null?Kl=new Set([this]):Kl.add(this));var v=r.stack;this.componentDidCatch(r.value,{componentStack:v!==null?v:""})}),s}function bC(e,r,s){var u=e.pingCache;if(u===null){u=e.pingCache=new hN;var m=new Set;u.set(r,m)}else m=u.get(r),m===void 0&&(m=new Set,u.set(r,m));m.has(s)||(m.add(s),e=PN.bind(null,e,r,s),r.then(e,e))}function wC(e){do{var r;if((r=e.tag===13)&&(r=e.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return e;e=e.return}while(e!==null);return null}function SC(e,r,s,u,m){return e.mode&1?(e.flags|=65536,e.lanes=m,e):(e===r?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(r=Ma(-1,1),r.tag=2,Xl(s,r,1))),s.lanes|=1),e)}var pN=Fa.ReactCurrentOwner,Di=!1;function mi(e,r,s,u){r.child=e===null?yR(r,null,s,u):Jh(r,e.child,s,u)}function TC(e,r,s,u,m){s=s.render;var x=r.ref;return Mh(r,m),u=$2(e,r,s,u,x,m),s=G2(),e!==null&&!Di?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~m,La(e,r,m)):(kr&&s&&R2(r),r.flags|=1,mi(e,r,u,m),r.child)}function EC(e,r,s,u,m){if(e===null){var x=s.type;return typeof x=="function"&&!eS(x)&&x.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(r.tag=15,r.type=x,$R(e,r,x,u,m)):(e=W_(s.type,null,u,r,r.mode,m),e.ref=r.ref,e.return=r,r.child=e)}if(x=e.child,!(e.lanes&m)){var v=x.memoizedProps;if(s=s.compare,s=s!==null?s:Lm,s(v,u)&&e.ref===r.ref)return La(e,r,m)}return r.flags|=1,e=Ql(x,u),e.ref=r.ref,e.return=r,r.child=e}function $R(e,r,s,u,m){if(e!==null){var x=e.memoizedProps;if(Lm(x,u)&&e.ref===r.ref)if(Di=!1,r.pendingProps=u=x,(e.lanes&m)!==0)e.flags&131072&&(Di=!0);else return r.lanes=e.lanes,La(e,r,m)}return pw(e,r,s,u,m)}function GR(e,r,s){var u=r.pendingProps,m=u.children,x=e!==null?e.memoizedState:null;if(u.mode==="hidden")if(!(r.mode&1))r.memoizedState={baseLanes:0,cachePool:null,transitions:null},br(Sh,Xi),Xi|=s;else{if(!(s&1073741824))return e=x!==null?x.baseLanes|s:s,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:e,cachePool:null,transitions:null},r.updateQueue=null,br(Sh,Xi),Xi|=e,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=x!==null?x.baseLanes:s,br(Sh,Xi),Xi|=u}else x!==null?(u=x.baseLanes|s,r.memoizedState=null):u=s,br(Sh,Xi),Xi|=u;return mi(e,r,m,s),r.child}function qR(e,r){var s=r.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(r.flags|=512,r.flags|=2097152)}function pw(e,r,s,u,m){var x=zi(s)?Eu:ii.current;return x=Yh(r,x),Mh(r,m),s=$2(e,r,s,u,x,m),u=G2(),e!==null&&!Di?(r.updateQueue=e.updateQueue,r.flags&=-2053,e.lanes&=~m,La(e,r,m)):(kr&&u&&R2(r),r.flags|=1,mi(e,r,s,m),r.child)}function PC(e,r,s,u,m){if(zi(s)){var x=!0;_v(r)}else x=!1;if(Mh(r,m),r.stateNode===null)$_(e,r),BR(r,s,u),dw(r,s,u,m),u=!0;else if(e===null){var v=r.stateNode,c=r.memoizedProps;v.props=c;var A=v.context,L=s.contextType;typeof L=="object"&&L!==null?L=To(L):(L=zi(s)?Eu:ii.current,L=Yh(r,L));var z=s.getDerivedStateFromProps,j=typeof z=="function"||typeof v.getSnapshotBeforeUpdate=="function";j||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(c!==u||A!==L)&&xC(r,v,u,L),Ml=!1;var V=r.memoizedState;v.state=V,Sv(r,u,v,m),A=r.memoizedState,c!==u||V!==A||Li.current||Ml?(typeof z=="function"&&(uw(r,s,z,u),A=r.memoizedState),(c=Ml||vC(r,s,c,u,V,A,
vendor: 7,256 bytes, line 41
41L))?(j||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(r.flags|=4194308)):(typeof v.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=A),v.props=u,v.state=A,v.context=L,u=c):(typeof v.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{v=r.stateNode,vR(e,r),c=r.memoizedProps,L=r.type===r.elementType?c:qo(r.type,c),v.props=L,j=r.pendingProps,V=v.context,A=s.contextType,typeof A=="object"&&A!==null?A=To(A):(A=zi(s)?Eu:ii.current,A=Yh(r,A));var Z=s.getDerivedStateFromProps;(z=typeof Z=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(c!==j||V!==A)&&xC(r,v,u,A),Ml=!1,V=r.memoizedState,v.state=V,Sv(r,u,v,m);var K=r.memoizedState;c!==j||V!==K||Li.current||Ml?(typeof Z=="function"&&(uw(r,s,Z,u),K=r.memoizedState),(L=Ml||vC(r,s,L,u,V,K,A)||!1)?(z||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(u,K,A),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(u,K,A)),typeof v.componentDidUpdate=="function"&&(r.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof v.componentDidUpdate!="function"||c===e.memoizedProps&&V===e.memoizedState||(r.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&V===e.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=K),v.props=u,v.state=K,v.context=A,u=L):(typeof v.componentDidUpdate!="function"||c===e.memoizedProps&&V===e.memoizedState||(r.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&V===e.memoizedState||(r.flags|=1024),u=!1)}return fw(e,r,s,u,x,m)}function fw(e,r,s,u,m,x){qR(e,r);var v=(r.flags&128)!==0;if(!u&&!v)return m&&dC(r,s,!1),La(e,r,x);u=r.stateNode,pN.current=r;var c=v&&typeof s.getDerivedStateFromError!="function"?null:u.render();return r.flags|=1,e!==null&&v?(r.child=Jh(r,e.child,null,x),r.child=Jh(r,null,c,x)):mi(e,r,c,x),r.memoizedState=u.state,m&&dC(r,s,!0),r.child}function WR(e){var r=e.stateNode;r.pendingContext?uC(e,r.pendingContext,r.pendingContext!==r.context):r.context&&uC(e,r.context,!1),N2(e,r.containerInfo)}function CC(e,r,s,u,m){return Qh(),D2(m),r.flags|=256,mi(e,r,s,u),r.child}var mw={dehydrated:null,treeContext:null,retryLane:0};function gw(e){return{baseLanes:e,cachePool:null,transitions:null}}function ZR(e,r,s){var u=r.pendingProps,m=Or.current,x=!1,v=(r.flags&128)!==0,c;if((c=v)||(c=e!==null&&e.memoizedState===null?!1:(m&2)!==0),c?(x=!0,r.flags&=-129):(e===null||e.memoizedState!==null)&&(m|=1),br(Or,m&1),e===null)return lw(r),e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(r.mode&1?e.data==="$!"?r.lanes=8:r.lanes=1073741824:r.lanes=1,null):(v=u.children,e=u.fallback,x?(u=r.mode,x=r.child,v={mode:"hidden",children:v},!(u&1)&&x!==null?(x.childLanes=0,x.pendingProps=v):x=o0(v,u,0,null),e=Tu(e,u,s,null),x.return=r,e.return=r,x.sibling=e,r.child=x,r.child.memoizedState=gw(s),r.memoizedState=mw,e):Z2(r,v));if(m=e.memoizedState,m!==null&&(c=m.dehydrated,c!==null))return fN(e,r,v,u,c,m,s);if(x){x=u.fallback,v=r.mode,m=e.child,c=m.sibling;var A={mode:"hidden",children:u.children};return!(v&1)&&r.child!==m?(u=r.child,u.childLanes=0,u.pendingProps=A,r.deletions=null):(u=Ql(m,A),u.subtreeFlags=m.subtreeFlags&14680064),c!==null?x=Ql(c,x):(x=Tu(x,v,s,null),x.flags|=2),x.return=r,u.return=r,u.sibling=x,r.child=u,u=x,x=r.child,v=e.child.memoizedState,v=v===null?gw(s):{baseLanes:v.baseLanes|s,cachePool:null,transitions:v.transitions},x.memoizedState=v,x.childLanes=e.childLanes&~s,r.memoizedState=mw,u}return x=e.child,e=x.sibling,u=Ql(x,{mode:"visible",children:u.children}),!(r.mode&1)&&(u.lanes=s),u.return=r,u.sibling=null,e!==null&&(s=r.deletions,s===null?(r.deletions=[e],r.flags|=16):s.push(e)),r.child=u,r.memoizedState=null,u}function Z2(e,r){return r=o0({mode:"visible",children:r},e.mode,0,null),r.return=e,e.child=r}function p_(e,r,s,u){return u!==null&&D2(u),Jh(r,e.child,null,s),e=Z2(r,r.pendingProps.children),e.flags|=2,r.memoizedState=null,e}function fN(e,r,s,u,m,x,v){if(s)return r.flags&256?(r.flags&=-257,u=Nb(Error(nt(422))),p_(e,r,v,u)):r.memoizedState!==null?(r.child=e.child,r.flags|=128,null):(x=u.fallback,m=r.mode,u=o0({mode:"visible",children:u.children},m,0,null),x=Tu(x,m,v,null),x.flags|=2,u.return=r,x.return=r,u.sibling=x,r.child=u,r.mode&1&&Jh(r,e.child,null,v),r.child.memoizedState=gw(v),r.memoizedState=mw,x);if(!(r.mode&1))return p_(e,r,v,null);if(m.data==="$!"){if(u=m.nextSibling&&m.nextSibling.dataset,u)var c=u.dgst;return u=c,x=Error(nt(419)),u=Nb(x,u,void 0),p_(e,r,v,u)}if(c=(v&e.childLanes)!==0,Di||c){if(u=Dn,u!==null){switch(v&-v){case 4:m=2;break;case 16:m=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:m=32;break;case 536870912:m=268435456;break;default:m=0}m=m&(u.suspendedLanes|v)?0:m,m!==0&&m!==x.retryLane&&(x.retryLane=m,Da(e,m),Ko(u,e,m,-1))}return J2(),u=Nb(Error(nt(421))),p_(e,r,v,u)}return m.data==="$?"?(r.flags|=128,r.child=e.child,r=CN.bind(null,e),m._reactRetry=r,null):(e=x.treeContext,Ji=Hl(m.nextSibling),eo=r,kr=!0,Ho=null,e!==null&&(_o[vo++]=Ca,_o[vo++]=Ia,_o[vo++]=Pu,Ca=e.id,Ia=e.overflow,Pu=r),r=Z2(r,u.children),r.flags|=4096,r)}function IC(e,r,s){e.lanes|=r;var u=e.alternate;u!==null&&(u.lanes|=r),cw(e.return,r,s)}function Bb(e,r,s,u,m){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:s,tailMode:m}:(x.isBackwards=r,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=s,x.tailMode=m)}function HR(e,r,s){var u=r.pendingProps,m=u.revealOrder,x=u.tail;if(mi(e,r,u.children,s),u=Or.current,u&2)u=u&1|2,r.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=r.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&IC(e,s,r);else if(e.tag===19)IC(e,s,r);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===r)break e;for(;e.sibling===null;){if(e.return===null||e.return===r)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}u&=1}if(br(Or,u),!(r.mode&1))r.memoizedState=null;else switch(m){case"forwards":for(s=r.child,m=null;s!==null;)e=s.alternate,e!==null&&Tv(e)===null&&(m=s),s=s.sibling;s=m,s===null?(m=r.child,r.child=null):(m=s.sibling,s.sibling=null),Bb(r,!1,m,s,x);break;case"backwards":for(s=null,m=r.child,r.child=null;m!==null;){if(e=m.alternate,e!==null&&Tv(e)===null){r.child=m;break}e=m.sibling,m.sibling=s,s=m,m=e}Bb(r,!0,s,null,x);break;case"together":Bb(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function $_(e,r){!(r.mode&1)&&e!==null&&(e.alternate=null,r.alternate=null,r.flags|=2)}function La(e,r,s){if(e!==null&&(r.dependencies=e.dependencies),Iu|=r.lanes,!(s&r.childLanes))return null;if(e!==null&&r.child!==e.child)throw Error(nt(153));
vendor: 4,175 bytes, line 41
41if(r.child!==null){for(e=r.child,s=Ql(e,e.pendingProps),r.child=s,s.return=r;e.sibling!==null;)e=e.sibling,s=s.sibling=Ql(e,e.pendingProps),s.return=r;s.sibling=null}return r.child}function mN(e,r,s){switch(r.tag){case 3:WR(r),Qh();break;case 5:xR(r);break;case 1:zi(r.type)&&_v(r);break;case 4:N2(r,r.stateNode.containerInfo);break;case 10:var u=r.type._context,m=r.memoizedProps.value;br(bv,u._currentValue),u._currentValue=m;break;case 13:if(u=r.memoizedState,u!==null)return u.dehydrated!==null?(br(Or,Or.current&1),r.flags|=128,null):s&r.child.childLanes?ZR(e,r,s):(br(Or,Or.current&1),e=La(e,r,s),e!==null?e.sibling:null);br(Or,Or.current&1);break;case 19:if(u=(s&r.childLanes)!==0,e.flags&128){if(u)return HR(e,r,s);r.flags|=128}if(m=r.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),br(Or,Or.current),u)break;return null;case 22:case 23:return r.lanes=0,GR(e,r,s)}return La(e,r,s)}var XR,yw,KR,YR;XR=function(e,r){for(var s=r.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return;s=s.return}s.sibling.return=s.return,s=s.sibling}};yw=function(){};KR=function(e,r,s,u){var m=e.memoizedProps;if(m!==u){e=r.stateNode,du(ks.current);var x=null;switch(s){case"input":m=N1(e,m),u=N1(e,u),x=[];break;case"select":m=jr({},m,{value:void 0}),u=jr({},u,{value:void 0}),x=[];break;case"textarea":m=U1(e,m),u=U1(e,u),x=[];break;default:typeof m.onClick!="function"&&typeof u.onClick=="function"&&(e.onclick=gv)}G1(s,u);var v;s=null;for(L in m)if(!u.hasOwnProperty(L)&&m.hasOwnProperty(L)&&m[L]!=null)if(L==="style"){var c=m[L];for(v in c)c.hasOwnProperty(v)&&(s||(s={}),s[v]="")}else L!=="dangerouslySetInnerHTML"&&L!=="children"&&L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&L!=="autoFocus"&&(Cm.hasOwnProperty(L)?x||(x=[]):(x=x||[]).push(L,null));for(L in u){var A=u[L];if(c=m!=null?m[L]:void 0,u.hasOwnProperty(L)&&A!==c&&(A!=null||c!=null))if(L==="style")if(c){for(v in c)!c.hasOwnProperty(v)||A&&A.hasOwnProperty(v)||(s||(s={}),s[v]="");for(v in A)A.hasOwnProperty(v)&&c[v]!==A[v]&&(s||(s={}),s[v]=A[v])}else s||(x||(x=[]),x.push(L,s)),s=A;else L==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,c=c?c.__html:void 0,A!=null&&c!==A&&(x=x||[]).push(L,A)):L==="children"?typeof A!="string"&&typeof A!="number"||(x=x||[]).push(L,""+A):L!=="suppressContentEditableWarning"&&L!=="suppressHydrationWarning"&&(Cm.hasOwnProperty(L)?(A!=null&&L==="onScroll"&&Cr("scroll",e),x||c===A||(x=[])):(x=x||[]).push(L,A))}s&&(x=x||[]).push("style",s);var L=x;(r.updateQueue=L)&&(r.flags|=4)}};YR=function(e,r,s,u){s!==u&&(r.flags|=4)};function Qf(e,r){if(!kr)switch(e.tailMode){case"hidden":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?r||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function ti(e){var r=e.alternate!==null&&e.alternate.child===e.child,s=0,u=0;if(r)for(var m=e.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags&14680064,u|=m.flags&14680064,m.return=e,m=m.sibling;else for(m=e.child;m!==null;)s|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=e,m=m.sibling;return e.subtreeFlags|=u,e.childLanes=s,r}function gN(e,r,s){var u=r.pendingProps;switch(k2(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ti(r),null;case 1:return zi(r.type)&&yv(),ti(r),null;case 3:return u=r.stateNode,ep(),Ir(Li),Ir(ii),V2(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(e===null||e.child===null)&&(d_(r)?r.flags|=4:e===null||e.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,Ho!==null&&(Ew(Ho),Ho=null))),yw(e,r),ti(r),null;case 5:B2(r);var m=du(Nm.current);if(s=r.type,e!==null&&r.stateNode!=null)KR(e,r,s,u,m),e.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!u){if(r.stateNode===null)throw Error(nt(166));return ti(r),null}if(e=du(ks.current),d_(r)){u=r.stateNode,s=r.type;var x=r.memoizedProps;
vendor: 1,524 bytes, line 41
41switch(u[Cs]=r,u[Fm]=x,e=(r.mode&1)!==0,s){case"dialog":Cr("cancel",u),Cr("close",u);break;case"iframe":case"object":case"embed":Cr("load",u);break;case"video":case"audio":for(m=0;m<hm.length;m++)Cr(hm[m],u);break;case"source":Cr("error",u);break;case"img":case"image":case"link":Cr("error",u),Cr("load",u);break;case"details":Cr("toggle",u);break;case"input":FP(u,x),Cr("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!x.multiple},Cr("invalid",u);break;case"textarea":NP(u,x),Cr("invalid",u)}G1(s,x),m=null;for(var v in x)if(x.hasOwnProperty(v)){var c=x[v];v==="children"?typeof c=="string"?u.textContent!==c&&(x.suppressHydrationWarning!==!0&&u_(u.textContent,c,e),m=["children",c]):typeof c=="number"&&u.textContent!==""+c&&(x.suppressHydrationWarning!==!0&&u_(u.textContent,c,e),m=["children",""+c]):Cm.hasOwnProperty(v)&&c!=null&&v==="onScroll"&&Cr("scroll",u)}switch(s){case"input":r_(u),jP(u,x,!0);break;case"textarea":r_(u),BP(u);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(u.onclick=gv)}u=m,r.updateQueue=u,u!==null&&(r.flags|=4)}else{v=m.nodeType===9?m:m.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=EA(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=v.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof u.is=="string"?e=v.createElement(s,{is:u.is}):(e=v.createElement(s),s==="select"&&(v=e,u.multiple?v.multiple=!0:u.size&&(v.size=u.size))):e=v.createElementNS(e,s),e[Cs]=r,e[Fm]=u,XR(e,r,!1,!1),r.stateNode=e;
vendor: 30,860 bytes, line 41
41e:{switch(v=q1(s,u),s){case"dialog":Cr("cancel",e),Cr("close",e),m=u;break;case"iframe":case"object":case"embed":Cr("load",e),m=u;break;case"video":case"audio":for(m=0;m<hm.length;m++)Cr(hm[m],e);m=u;break;case"source":Cr("error",e),m=u;break;case"img":case"image":case"link":Cr("error",e),Cr("load",e),m=u;break;case"details":Cr("toggle",e),m=u;break;case"input":FP(e,u),m=N1(e,u),Cr("invalid",e);break;case"option":m=u;break;case"select":e._wrapperState={wasMultiple:!!u.multiple},m=jr({},u,{value:void 0}),Cr("invalid",e);break;case"textarea":NP(e,u),m=U1(e,u),Cr("invalid",e);break;default:m=u}G1(s,m),c=m;for(x in c)if(c.hasOwnProperty(x)){var A=c[x];x==="style"?IA(e,A):x==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,A!=null&&PA(e,A)):x==="children"?typeof A=="string"?(s!=="textarea"||A!=="")&&Im(e,A):typeof A=="number"&&Im(e,""+A):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(Cm.hasOwnProperty(x)?A!=null&&x==="onScroll"&&Cr("scroll",e):A!=null&&y2(e,x,A,v))}switch(s){case"input":r_(e),jP(e,u,!1);break;case"textarea":r_(e),BP(e);break;case"option":u.value!=null&&e.setAttribute("value",""+tc(u.value));break;case"select":e.multiple=!!u.multiple,x=u.value,x!=null?Eh(e,!!u.multiple,x,!1):u.defaultValue!=null&&Eh(e,!!u.multiple,u.defaultValue,!0);break;default:typeof m.onClick=="function"&&(e.onclick=gv)}switch(s){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return ti(r),null;case 6:if(e&&r.stateNode!=null)YR(e,r,e.memoizedProps,u);else{if(typeof u!="string"&&r.stateNode===null)throw Error(nt(166));if(s=du(Nm.current),du(ks.current),d_(r)){if(u=r.stateNode,s=r.memoizedProps,u[Cs]=r,(x=u.nodeValue!==s)&&(e=eo,e!==null))switch(e.tag){case 3:u_(u.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&u_(u.nodeValue,s,(e.mode&1)!==0)}x&&(r.flags|=4)}else u=(s.nodeType===9?s:s.ownerDocument).createTextNode(u),u[Cs]=r,r.stateNode=u}return ti(r),null;case 13:if(Ir(Or),u=r.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(kr&&Ji!==null&&r.mode&1&&!(r.flags&128))mR(),Qh(),r.flags|=98560,x=!1;else if(x=d_(r),u!==null&&u.dehydrated!==null){if(e===null){if(!x)throw Error(nt(318));if(x=r.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(nt(317));x[Cs]=r}else Qh(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;ti(r),x=!1}else Ho!==null&&(Ew(Ho),Ho=null),x=!0;if(!x)return r.flags&65536?r:null}return r.flags&128?(r.lanes=s,r):(u=u!==null,u!==(e!==null&&e.memoizedState!==null)&&u&&(r.child.flags|=8192,r.mode&1&&(e===null||Or.current&1?_n===0&&(_n=3):J2())),r.updateQueue!==null&&(r.flags|=4),ti(r),null);case 4:return ep(),yw(e,r),e===null&&zm(r.stateNode.containerInfo),ti(r),null;case 10:return O2(r.type._context),ti(r),null;case 17:return zi(r.type)&&yv(),ti(r),null;case 19:if(Ir(Or),x=r.memoizedState,x===null)return ti(r),null;if(u=(r.flags&128)!==0,v=x.rendering,v===null)if(u)Qf(x,!1);else{if(_n!==0||e!==null&&e.flags&128)for(e=r.child;e!==null;){if(v=Tv(e),v!==null){for(r.flags|=128,Qf(x,!1),u=v.updateQueue,u!==null&&(r.updateQueue=u,r.flags|=4),r.subtreeFlags=0,u=s,s=r.child;s!==null;)x=s,e=u,x.flags&=14680066,v=x.alternate,v===null?(x.childLanes=0,x.lanes=e,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=v.childLanes,x.lanes=v.lanes,x.child=v.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=v.memoizedProps,x.memoizedState=v.memoizedState,x.updateQueue=v.updateQueue,x.type=v.type,e=v.dependencies,x.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return br(Or,Or.current&1|2),r.child}e=e.sibling}x.tail!==null&&Xr()>rp&&(r.flags|=128,u=!0,Qf(x,!1),r.lanes=4194304)}else{if(!u)if(e=Tv(v),e!==null){if(r.flags|=128,u=!0,s=e.updateQueue,s!==null&&(r.updateQueue=s,r.flags|=4),Qf(x,!0),x.tail===null&&x.tailMode==="hidden"&&!v.alternate&&!kr)return ti(r),null}else 2*Xr()-x.renderingStartTime>rp&&s!==1073741824&&(r.flags|=128,u=!0,Qf(x,!1),r.lanes=4194304);x.isBackwards?(v.sibling=r.child,r.child=v):(s=x.last,s!==null?s.sibling=v:r.child=v,x.last=v)}return x.tail!==null?(r=x.tail,x.rendering=r,x.tail=r.sibling,x.renderingStartTime=Xr(),r.sibling=null,s=Or.current,br(Or,u?s&1|2:s&1),r):(ti(r),null);case 22:case 23:return Q2(),u=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==u&&(r.flags|=8192),u&&r.mode&1?Xi&1073741824&&(ti(r),r.subtreeFlags&6&&(r.flags|=8192)):ti(r),null;case 24:return null;case 25:return null}throw Error(nt(156,r.tag))}function yN(e,r){switch(k2(r),r.tag){case 1:return zi(r.type)&&yv(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return ep(),Ir(Li),Ir(ii),V2(),e=r.flags,e&65536&&!(e&128)?(r.flags=e&-65537|128,r):null;case 5:return B2(r),null;case 13:if(Ir(Or),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(nt(340));Qh()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Ir(Or),null;case 4:return ep(),null;case 10:return O2(r.type._context),null;case 22:case 23:return Q2(),null;case 24:return null;default:return null}}var f_=!1,ni=!1,_N=typeof WeakSet=="function"?WeakSet:Set,yt=null;function wh(e,r){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(u){qr(e,r,u)}else s.current=null}function _w(e,r,s){try{s()}catch(u){qr(e,r,u)}}var MC=!1;function vN(e,r){if(tw=pv,e=rR(),A2(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var u=s.getSelection&&s.getSelection();if(u&&u.rangeCount!==0){s=u.anchorNode;var m=u.anchorOffset,x=u.focusNode;u=u.focusOffset;try{s.nodeType,x.nodeType}catch{s=null;break e}var v=0,c=-1,A=-1,L=0,z=0,j=e,V=null;t:for(;;){for(var Z;j!==s||m!==0&&j.nodeType!==3||(c=v+m),j!==x||u!==0&&j.nodeType!==3||(A=v+u),j.nodeType===3&&(v+=j.nodeValue.length),(Z=j.firstChild)!==null;)V=j,j=Z;for(;;){if(j===e)break t;if(V===s&&++L===m&&(c=v),V===x&&++z===u&&(A=v),(Z=j.nextSibling)!==null)break;j=V,V=j.parentNode}j=Z}s=c===-1||A===-1?null:{start:c,end:A}}else s=null}s=s||{start:0,end:0}}else s=null;for(rw={focusedElem:e,selectionRange:s},pv=!1,yt=r;yt!==null;)if(r=yt,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,yt=e;else for(;yt!==null;){r=yt;try{var K=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(K!==null){var Y=K.memoizedProps,ie=K.memoizedState,Q=r.stateNode,G=Q.getSnapshotBeforeUpdate(r.elementType===r.type?Y:qo(r.type,Y),ie);Q.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var J=r.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(nt(163))}}catch(ue){qr(r,r.return,ue)}if(e=r.sibling,e!==null){e.return=r.return,yt=e;break}yt=r.return}return K=MC,MC=!1,K}function wm(e,r,s){var u=r.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var m=u=u.next;do{if((m.tag&e)===e){var x=m.destroy;m.destroy=void 0,x!==void 0&&_w(r,s,x)}m=m.next}while(m!==u)}}function n0(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var u=s.create;s.destroy=u()}s=s.next}while(s!==r)}}function vw(e){var r=e.ref;if(r!==null){var s=e.stateNode;switch(e.tag){case 5:e=s;break;default:e=s}typeof r=="function"?r(e):r.current=e}}function QR(e){var r=e.alternate;r!==null&&(e.alternate=null,QR(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[Cs],delete r[Fm],delete r[ow],delete r[tN],delete r[rN])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function JR(e){return e.tag===5||e.tag===3||e.tag===4}function AC(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||JR(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function xw(e,r,s){var u=e.tag;if(u===5||u===6)e=e.stateNode,r?s.nodeType===8?s.parentNode.insertBefore(e,r):s.insertBefore(e,r):(s.nodeType===8?(r=s.parentNode,r.insertBefore(e,s)):(r=s,r.appendChild(e)),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=gv));else if(u!==4&&(e=e.child,e!==null))for(xw(e,r,s),e=e.sibling;e!==null;)xw(e,r,s),e=e.sibling}function bw(e,r,s){var u=e.tag;if(u===5||u===6)e=e.stateNode,r?s.insertBefore(e,r):s.appendChild(e);else if(u!==4&&(e=e.child,e!==null))for(bw(e,r,s),e=e.sibling;e!==null;)bw(e,r,s),e=e.sibling}var Gn=null,Zo=!1;function wl(e,r,s){for(s=s.child;s!==null;)ek(e,r,s),s=s.sibling}function ek(e,r,s){if(Rs&&typeof Rs.onCommitFiberUnmount=="function")try{Rs.onCommitFiberUnmount(Xv,s)}catch{}switch(s.tag){case 5:ni||wh(s,r);case 6:var u=Gn,m=Zo;Gn=null,wl(e,r,s),Gn=u,Zo=m,Gn!==null&&(Zo?(e=Gn,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):Gn.removeChild(s.stateNode));break;case 18:Gn!==null&&(Zo?(e=Gn,s=s.stateNode,e.nodeType===8?Db(e.parentNode,s):e.nodeType===1&&Db(e,s),km(e)):Db(Gn,s.stateNode));break;case 4:u=Gn,m=Zo,Gn=s.stateNode.containerInfo,Zo=!0,wl(e,r,s),Gn=u,Zo=m;break;case 0:case 11:case 14:case 15:if(!ni&&(u=s.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){m=u=u.next;do{var x=m,v=x.destroy;x=x.tag,v!==void 0&&(x&2||x&4)&&_w(s,r,v),m=m.next}while(m!==u)}wl(e,r,s);break;case 1:if(!ni&&(wh(s,r),u=s.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=s.memoizedProps,u.state=s.memoizedState,u.componentWillUnmount()}catch(c){qr(s,r,c)}wl(e,r,s);break;case 21:wl(e,r,s);break;case 22:s.mode&1?(ni=(u=ni)||s.memoizedState!==null,wl(e,r,s),ni=u):wl(e,r,s);break;default:wl(e,r,s)}}function RC(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new _N),r.forEach(function(u){var m=IN.bind(null,e,u);s.has(u)||(s.add(u),u.then(m,m))})}}function Go(e,r){var s=r.deletions;if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];try{var x=e,v=r,c=v;e:for(;c!==null;){switch(c.tag){case 5:Gn=c.stateNode,Zo=!1;break e;case 3:Gn=c.stateNode.containerInfo,Zo=!0;break e;case 4:Gn=c.stateNode.containerInfo,Zo=!0;break e}c=c.return}if(Gn===null)throw Error(nt(160));ek(x,v,m),Gn=null,Zo=!1;var A=m.alternate;A!==null&&(A.return=null),m.return=null}catch(L){qr(m,r,L)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)tk(r,e),r=r.sibling}function tk(e,r){var s=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Go(r,e),bs(e),u&4){try{wm(3,e,e.return),n0(3,e)}catch(Y){qr(e,e.return,Y)}try{wm(5,e,e.return)}catch(Y){qr(e,e.return,Y)}}break;case 1:Go(r,e),bs(e),u&512&&s!==null&&wh(s,s.return);break;case 5:if(Go(r,e),bs(e),u&512&&s!==null&&wh(s,s.return),e.flags&32){var m=e.stateNode;try{Im(m,"")}catch(Y){qr(e,e.return,Y)}}if(u&4&&(m=e.stateNode,m!=null)){var x=e.memoizedProps,v=s!==null?s.memoizedProps:x,c=e.type,A=e.updateQueue;if(e.updateQueue=null,A!==null)try{c==="input"&&x.type==="radio"&&x.name!=null&&SA(m,x),q1(c,v);var L=q1(c,x);for(v=0;v<A.length;v+=2){var z=A[v],j=A[v+1];z==="style"?IA(m,j):z==="dangerouslySetInnerHTML"?PA(m,j):z==="children"?Im(m,j):y2(m,z,j,L)}switch(c){case"input":B1(m,x);break;case"textarea":TA(m,x);break;case"select":var V=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!x.multiple;var Z=x.value;Z!=null?Eh(m,!!x.multiple,Z,!1):V!==!!x.multiple&&(x.defaultValue!=null?Eh(m,!!x.multiple,x.defaultValue,!0):Eh(m,!!x.multiple,x.multiple?[]:"",!1))}m[Fm]=x}catch(Y){qr(e,e.return,Y)}}break;case 6:if(Go(r,e),bs(e),u&4){if(e.stateNode===null)throw Error(nt(162));m=e.stateNode,x=e.memoizedProps;try{m.nodeValue=x}catch(Y){qr(e,e.return,Y)}}break;case 3:if(Go(r,e),bs(e),u&4&&s!==null&&s.memoizedState.isDehydrated)try{km(r.containerInfo)}catch(Y){qr(e,e.return,Y)}break;case 4:Go(r,e),bs(e);break;case 13:Go(r,e),bs(e),m=e.child,m.flags&8192&&(x=m.memoizedState!==null,m.stateNode.isHidden=x,!x||m.alternate!==null&&m.alternate.memoizedState!==null||(K2=Xr())),u&4&&RC(e);break;case 22:if(z=s!==null&&s.memoizedState!==null,e.mode&1?(ni=(L=ni)||z,Go(r,e),ni=L):Go(r,e),bs(e),u&8192){if(L=e.memoizedState!==null,(e.stateNode.isHidden=L)&&!z&&e.mode&1)for(yt=e,z=e.child;z!==null;){for(j=yt=z;yt!==null;){switch(V=yt,Z=V.child,V.tag){case 0:case 11:case 14:case 15:wm(4,V,V.return);break;case 1:wh(V,V.return);var K=V.stateNode;if(typeof K.componentWillUnmount=="function"){u=V,s=V.return;try{r=u,K.props=r.memoizedProps,K.state=r.memoizedState,K.componentWillUnmount()}catch(Y){qr(u,s,Y)}}break;case 5:wh(V,V.return);break;case 22:if(V.memoizedState!==null){DC(j);continue}}Z!==null?(Z.return=V,yt=Z):DC(j)}z=z.sibling}e:for(z=null,j=e;;){if(j.tag===5){if(z===null){z=j;try{m=j.stateNode,L?(x=m.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(c=j.stateNode,A=j.memoizedProps.style,v=A!=null&&A.hasOwnProperty("display")?A.display:null,c.style.display=CA("display",v))}catch(Y){qr(e,e.return,Y)}}}else if(j.tag===6){if(z===null)try{j.stateNode.nodeValue=L?"":j.memoizedProps}catch(Y){qr(e,e.return,Y)}}else if((j.tag!==22&&j.tag!==23||j.memoizedState===null||j===e)&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===e)break e;for(;j.sibling===null;){if(j.return===null||j.return===e)break e;z===j&&(z=null),j=j.return}z===j&&(z=null),j.sibling.return=j.return,j=j.sibling}}break;case 19:Go(r,e),bs(e),u&4&&RC(e);break;case 21:break;default:Go(r,e),bs(e)}}function bs(e){var r=e.flags;if(r&2){try{e:{for(var s=e.return;s!==null;){if(JR(s)){var u=s;break e}s=s.return}throw Error(nt(160))}switch(u.tag){case 5:var m=u.stateNode;u.flags&32&&(Im(m,""),u.flags&=-33);var x=AC(e);bw(e,x,m);break;case 3:case 4:var v=u.stateNode.containerInfo,c=AC(e);xw(e,c,v);break;default:throw Error(nt(161))}}catch(A){qr(e,e.return,A)}e.flags&=-3}r&4096&&(e.flags&=-4097)}function xN(e,r,s){yt=e,rk(e)}function rk(e,r,s){for(var u=(e.mode&1)!==0;yt!==null;){var m=yt,x=m.child;if(m.tag===22&&u){var v=m.memoizedState!==null||f_;if(!v){var c=m.alternate,A=c!==null&&c.memoizedState!==null||ni;c=f_;var L=ni;if(f_=v,(ni=A)&&!L)for(yt=m;yt!==null;)v=yt,A=v.child,v.tag===22&&v.memoizedState!==null?LC(m):A!==null?(A.return=v,yt=A):LC(m);for(;x!==null;)yt=x,rk(x),x=x.sibling;yt=m,f_=c,ni=L}kC(e)}else m.subtreeFlags&8772&&x!==null?(x.return=m,yt=x):kC(e)}}function kC(e){for(;yt!==null;){var r=yt;if(r.flags&8772){var s=r.alternate;try{if(r.flags&8772)switch(r.tag){case 0:case 11:case 15:ni||n0(5,r);break;case 1:var u=r.stateNode;if(r.flags&4&&!ni)if(s===null)u.componentDidMount();else{var m=r.elementType===r.type?s.memoizedProps:qo(r.type,s.memoizedProps);u.componentDidUpdate(m,s.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var x=r.updateQueue;x!==null&&gC(r,x,u);break;case 3:var v=r.updateQueue;if(v!==null){if(s=null,r.child!==null)switch(r.child.tag){case 5:s=r.child.stateNode;break;case 1:s=r.child.stateNode}gC(r,v,s)}break;case 5:var c=r.stateNode;if(s===null&&r.flags&4){s=c;var A=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":A.autoFocus&&s.focus();break;case"img":A.src&&(s.src=A.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var L=r.alternate;if(L!==null){var z=L.memoizedState;if(z!==null){var j=z.dehydrated;j!==null&&km(j)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(nt(163))}ni||r.flags&512&&vw(r)}catch(V){qr(r,r.return,V)}}if(r===e){yt=null;break}if(s=r.sibling,s!==null){s.return=r.return,yt=s;break}yt=r.return}}function DC(e){for(;yt!==null;){var r=yt;if(r===e){yt=null;break}var s=r.sibling;if(s!==null){s.return=r.return,yt=s;break}yt=r.return}}function LC(e){for(;yt!==null;){var r=yt;try{switch(r.tag){case 0:case 11:case 15:var s=r.return;try{n0(4,r)}catch(A){qr(r,s,A)}break;case 1:var u=r.stateNode;if(typeof u.componentDidMount=="function"){var m=r.return;try{u.componentDidMount()}catch(A){qr(r,m,A)}}var x=r.return;try{vw(r)}catch(A){qr(r,x,A)}break;case 5:var v=r.return;try{vw(r)}catch(A){qr(r,v,A)}}}catch(A){qr(r,r.return,A)}if(r===e){yt=null;break}var c=r.sibling;if(c!==null){c.return=r.return,yt=c;break}yt=r.return}}var bN=Math.ceil,Cv=Fa.ReactCurrentDispatcher,H2=Fa.ReactCurrentOwner,bo=Fa.ReactCurrentBatchConfig,Qt=0,Dn=null,an=null,Wn=0,Xi=0,Sh=uc(0),_n=0,$m=null,Iu=0,i0=0,X2=0,Sm=null,ki=null,K2=0,rp=1/0,va=null,Iv=!1,ww=null,Kl=null,m_=!1,Ul=null,Mv=0,Tm=0,Sw=null,G_=-1,q_=0;function yi(){return Qt&6?Xr():G_!==-1?G_:G_=Xr()}function Yl(e){return e.mode&1?Qt&2&&Wn!==0?Wn&-Wn:iN.transition!==null?(q_===0&&(q_=BA()),q_):(e=lr,e!==0||(e=window.event,e=e===void 0?16:ZA(e.type)),e):1}function Ko(e,r,s,u){if(50<Tm)throw Tm=0,Sw=null,Error(nt(185));ig(e,s,u),(!(Qt&2)||e!==Dn)&&(e===Dn&&(!(Qt&2)&&(i0|=s),_n===4&&Rl(e,Wn)),Oi(e,u),s===1&&Qt===0&&!(r.mode&1)&&(rp=Xr()+500,e0&&dc()))}function Oi(e,r){var s=e.callbackNode;ij(e,r);var u=hv(e,e===Dn?Wn:0);if(u===0)s!==null&&$P(s),e.callbackNode=null,e.callbackPriority=0;else if(r=u&-u,e.callbackPriority!==r){if(s!=null&&$P(s),r===1)e.tag===0?nN(zC.bind(null,e)):hR(zC.bind(null,e)),Jj(function(){!(Qt&6)&&dc()}),s=null;else{switch(VA(u)){case 1:s=w2;break;case 4:s=jA;break;case 16:s=dv;break;case 536870912:s=NA;break;default:s=dv}s=uk(s,nk.bind(null,e))}e.callbackPriority=r,e.callbackNode=s}}function nk(e,r){if(G_=-1,q_=0,Qt&6)throw Error(nt(327));var s=e.callbackNode;if(Ah()&&e.callbackNode!==s)return null;var u=hv(e,e===Dn?Wn:0);if(u===0)return null;if(u&30||u&e.expiredLanes||r)r=Av(e,u);else{r=u;var m=Qt;Qt|=2;var x=ok();(Dn!==e||Wn!==r)&&(va=null,rp=Xr()+500,Su(e,r));do try{TN();break}catch(c){ik(e,c)}while(!0);z2(),Cv.current=x,Qt=m,an!==null?r=0:(Dn=null,Wn=0,r=_n)}if(r!==0){if(r===2&&(m=K1(e),m!==0&&(u=m,r=Tw(e,m))),r===1)throw s=$m,Su(e,0),Rl(e,u),Oi(e,Xr()),s;if(r===6)Rl(e,u);else{if(m=e.current.alternate,!(u&30)&&!wN(m)&&(r=Av(e,u),r===2&&(x=K1(e),x!==0&&(u=x,r=Tw(e,x))),r===1))throw s=$m,Su(e,0),Rl(e,u),Oi(e,Xr()),s;switch(e.finishedWork=m,e.finishedLanes=u,r){case 0:case 1:throw Error(nt(345));case 2:au(e,ki,va);break;case 3:if(Rl(e,u),(u&130023424)===u&&(r=K2+500-Xr(),10<r)){if(hv(e,0)!==0)break;if(m=e.suspendedLanes,(m&u)!==u){yi(),e.pingedLanes|=e.suspendedLanes&m;break}e.timeoutHandle=iw(au.bind(null,e,ki,va),r);break}au(e,ki,va);break;case 4:if(Rl(e,u),(u&4194240)===u)break;for(r=e.eventTimes,m=-1;0<u;){var v=31-Xo(u);x=1<<v,v=r[v],v>m&&(m=v),u&=~x}if(u=m,u=Xr()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*bN(u/1960))-u,10<u){e.timeoutHandle=iw(au.bind(null,e,ki,va),u);break}au(e,ki,va);break;case 5:au(e,ki,va);break;default:throw Error(nt(329))}}}return Oi(e,Xr()),e.callbackNode===s?nk.bind(null,e):null}function Tw(e,r){var s=Sm;return e.current.memoizedState.isDehydrated&&(Su(e,r).flags|=256),e=Av(e,r),e!==2&&(r=ki,ki=s,r!==null&&Ew(r)),e}function Ew(e){ki===null?ki=e:ki.push.apply(ki,e)}function wN(e){for(var r=e;;){if(r.flags&16384){var s=r.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var u=0;u<s.length;u++){var m=s[u],x=m.getSnapshot;m=m.value;try{if(!Qo(x(),m))return!1}catch{return!1}}}if(s=r.child,r.subtreeFlags&16384&&s!==null)s.return=r,r=s;else{if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Rl(e,r){for(r&=~X2,r&=~i0,e.suspendedLanes|=r,e.pingedLanes&=~r,e=e.expirationTimes;0<r;){var s=31-Xo(r),u=1<<s;e[s]=-1,r&=~u}}function zC(e){if(Qt&6)throw Error(nt(327));Ah();var r=hv(e,0);if(!(r&1))return Oi(e,Xr()),null;var s=Av(e,r);if(e.tag!==0&&s===2){var u=K1(e);u!==0&&(r=u,s=Tw(e,u))}if(s===1)throw s=$m,Su(e,0),Rl(e,r),Oi(e,Xr()),s;if(s===6)throw Error(nt(345));return e.finishedWork=e.current.alternate,e.finishedLanes=r,au(e,ki,va),Oi(e,Xr()),null}function Y2(e,r){var s=Qt;Qt|=1;try{return e(r)}finally{Qt=s,Qt===0&&(rp=Xr()+500,e0&&dc())}}function Mu(e){Ul!==null&&Ul.tag===0&&!(Qt&6)&&Ah();var r=Qt;Qt|=1;var s=bo.transition,u=lr;try{if(bo.transition=null,lr=1,e)return e()}finally{lr=u,bo.transition=s,Qt=r,!(Qt&6)&&dc()}}function Q2(){Xi=Sh.current,Ir(Sh)}function Su(e,r){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,Qj(s)),an!==null)for(s=an.return;s!==null;){var u=s;switch(k2(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&yv();break;case 3:ep(),Ir(Li),Ir(ii),V2();break;case 5:B2(u);break;case 4:ep();break;case 13:Ir(Or);break;case 19:Ir(Or);break;case 10:O2(u.type._context);break;case 22:case 23:Q2()}s=s.return}if(Dn=e,an=e=Ql(e.current,null),Wn=Xi=r,_n=0,$m=null,X2=i0=Iu=0,ki=Sm=null,uu!==null){for(r=0;r<uu.length;r++)if(s=uu[r],u=s.interleaved,u!==null){s.interleaved=null;var m=u.next,x=s.pending;if(x!==null){var v=x.next;x.next=m,u.next=v}s.pending=u}uu=null}return e}function ik(e,r){do{var s=an;try{if(z2(),V_.current=Pv,Ev){for(var u=Fr.memoizedState;u!==null;){var m=u.queue;m!==null&&(m.pending=null),u=u.next}Ev=!1}if(Cu=0,kn=gn=Fr=null,bm=!1,Bm=0,H2.current=null,s===null||s.return===null){_n=1,$m=r,an=null;break}e:{var x=e,v=s.return,c=s,A=r;if(r=Wn,c.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){var L=A,z=c,j=z.tag;if(!(z.mode&1)&&(j===0||j===11||j===15)){var V=z.alternate;V?(z.updateQueue=V.updateQueue,z.memoizedState=V.memoizedState,z.lanes=V.lanes):(z.updateQueue=null,z.memoizedState=null)}var Z=wC(v);if(Z!==null){Z.flags&=-257,SC(Z,v,c,x,r),Z.mode&1&&bC(x,L,r),r=Z,A=L;var K=r.updateQueue;if(K===null){var Y=new Set;Y.add(A),r.updateQueue=Y}else K.add(A);break e}else{if(!(r&1)){bC(x,L,r),J2();break e}A=Error(nt(426))}}else if(kr&&c.mode&1){var ie=wC(v);if(ie!==null){!(ie.flags&65536)&&(ie.flags|=256),SC(ie,v,c,x,r),D2(tp(A,c));break e}}x=A=tp(A,c),_n!==4&&(_n=2),Sm===null?Sm=[x]:Sm.push(x),x=v;do{switch(x.tag){case 3:x.flags|=65536,r&=-r,x.lanes|=r;var Q=VR(x,A,r);mC(x,Q);break e;case 1:c=A;var G=x.type,J=x.stateNode;if(!(x.flags&128)&&(typeof G.getDerivedStateFromError=="function"||J!==null&&typeof J.componentDidCatch=="function"&&(Kl===null||!Kl.has(J)))){x.flags|=65536,r&=-r,x.lanes|=r;var ue=UR(x,c,r);mC(x,ue);break e}}x=x.return}while(x!==null)}ak(s)}catch(ce){r=ce,an===s&&s!==null&&(an=s=s.return);continue}break}while(!0)}function ok(){var e=Cv.current;return Cv.current=Pv,e===null?Pv:e}function J2(){(_n===0||_n===3||_n===2)&&(_n=4),Dn===null||!(Iu&268435455)&&!(i0&268435455)||Rl(Dn,Wn)}function Av(e,r){var s=Qt;Qt|=2;var u=ok();(Dn!==e||Wn!==r)&&(va=null,Su(e,r));do try{SN();break}catch(m){ik(e,m)}while(!0);if(z2(),Qt=s,Cv.current=u,an!==null)throw Error(nt(261));return Dn=null,Wn=0,_n}function SN(){for(;an!==null;)sk(an)}function TN(){for(;an!==null&&!X4();)sk(an)}function sk(e){var r=ck(e.alternate,e,Xi);e.memoizedProps=e.pendingProps,r===null?ak(e):an=r,H2.current=null}function ak(e){var r=e;do{var s=r.alternate;if(e=r.return,r.flags&32768){if(s=yN(s,r),s!==null){s.flags&=32767,an=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{_n=6,an=null;return}}else if(s=gN(s,r,Xi),s!==null){an=s;return}if(r=r.sibling,r!==null){an=r;return}an=r=e}while(r!==null);_n===0&&(_n=5)}function au(e,r,s){var u=lr,m=bo.transition;try{bo.transition=null,lr=1,EN(e,r,s,u)}finally{bo.transition=m,lr=u}return null}function EN(e,r,s,u){do Ah();while(Ul!==null);if(Qt&6)throw Error(nt(327));s=e.finishedWork;var m=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(nt(177));e.callbackNode=null,e.callbackPriority=0;var x=s.lanes|s.childLanes;if(oj(e,x),e===Dn&&(an=Dn=null,Wn=0),!(s.subtreeFlags&2064)&&!(s.flags&2064)||m_||(m_=!0,uk(dv,function(){return Ah(),null})),x=(s.flags&15990)!==0,s.subtreeFlags&15990||x){x=bo.transition,bo.transition=null;var v=lr;lr=1;var c=Qt;Qt|=4,H2.current=null,vN(e,s),tk(s,e),qj(rw),pv=!!tw,rw=tw=null,e.current=s,xN(s),K4(),Qt=c,lr=v,bo.transition=x}else e.current=s;if(m_&&(m_=!1,Ul=e,Mv=m),x=e.pendingLanes,x===0&&(Kl=null),J4(s.stateNode),Oi(e,Xr()),r!==null)for(u=e.onRecoverableError,s=0;s<r.length;s++)m=r[s],u(m.value,{componentStack:m.stack,digest:m.digest});if(Iv)throw Iv=!1,e=ww,ww=null,e;return Mv&1&&e.tag!==0&&Ah(),x=e.pendingLanes,x&1?e===Sw?Tm++:(Tm=0,Sw=e):Tm=0,dc(),null}function Ah(){if(Ul!==null){var e=VA(Mv),r=bo.transition,s=lr;try{if(bo.transition=null,lr=16>e?16:e,Ul===null)var u=!1;else{if(e=Ul,Ul=null,Mv=0,Qt&6)throw Error(nt(331));var m=Qt;for(Qt|=4,yt=e.current;yt!==null;){var x=yt,v=x.child;if(yt.flags&16){var c=x.deletions;if(c!==null){for(var A=0;A<c.length;A++){var L=c[A];for(yt=L;yt!==null;){var z=yt;switch(z.tag){case 0:case 11:case 15:wm(8,z,x)}var j=z.child;if(j!==null)j.return=z,yt=j;else for(;yt!==null;){z=yt;var V=z.sibling,Z=z.return;if(QR(z),z===L){yt=null;break}if(V!==null){V.return=Z,yt=V;break}yt=Z}}}var K=x.alternate;if(K!==null){var Y=K.child;if(Y!==null){K.child=null;do{var ie=Y.sibling;Y.sibling=null,Y=ie}while(Y!==null)}}yt=x}}if(x.subtreeFlags&2064&&v!==null)v.return=x,yt=v;else e:for(;yt!==null;){if(x=yt,x.flags&2048)switch(x.tag){case 0:case 11:case 15:wm(9,x,x.return)}var Q=x.sibling;if(Q!==null){Q.return=x.return,yt=Q;break e}yt=x.return}}var G=e.current;for(yt=G;yt!==null;){v=yt;var J=v.child;if(v.subtreeFlags&2064&&J!==null)J.return=v,yt=J;else e:for(v=G;yt!==null;){if(c=yt,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:n0(9,c)}}catch(ce){qr(c,c.return,ce)}if(c===v){yt=null;break e}var ue=c.sibling;if(ue!==null){ue.return=c.return,yt=ue;break e}yt=c.return}}if(Qt=m,dc(),Rs&&typeof Rs.onPostCommitFiberRoot=="function")try{Rs.onPostCommitFiberRoot(Xv,e)}catch{}u=!0}return u}finally{lr=s,bo.transition=r}}return!1}function OC(e,r,s){r=tp(s,r),r=VR(e,r,1),e=Xl(e,r,1),r=yi(),e!==null&&(ig(e,1,r),Oi(e,r))}function qr(e,r,s){if(e.tag===3)OC(e,e,s);else for(;r!==null;){if(r.tag===3){OC(r,e,s);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Kl===null||!Kl.has(u))){e=tp(s,e),e=UR(r,e,1),r=Xl(r,e,1),e=yi(),r!==null&&(ig(r,1,e),Oi(r,e));break}}r=r.return}}function PN(e,r,s){var u=e.pingCache;u!==null&&u.delete(r),r=yi(),e.pingedLanes|=e.suspendedLanes&s,Dn===e&&(Wn&s)===s&&(_n===4||_n===3&&(Wn&130023424)===Wn&&500>Xr()-K2?Su(e,0):X2|=s),Oi(e,r)}function lk(e,r){r===0&&(e.mode&1?(r=o_,o_<<=1,!(o_&130023424)&&(o_=4194304)):r=1);var s=yi();e=Da(e,r),e!==null&&(ig(e,r,s),Oi(e,s))}function CN(e){var r=e.memoizedState,s=0;r!==null&&(s=r.retryLane),lk(e,s)}function IN(e,r){var s=0;switch(e.tag){case 13:var u=e.stateNode,m=e.memoizedState;m!==null&&(s=m.retryLane);break;case 19:u=e.stateNode;break;default:throw Error(nt(314))}u!==null&&u.delete(r),lk(e,s)}var ck;ck=function(e,r,s){if(e!==null)if(e.memoizedProps!==r.pendingProps||Li.current)Di=!0;else{if(!(e.lanes&s)&&!(r.flags&128))return Di=!1,mN(e,r,s);Di=!!(e.flags&131072)}else Di=!1,kr&&r.flags&1048576&&pR(r,xv,r.index);switch(r.lanes=0,r.tag){case 2:var u=r.type;$_(e,r),e=r.pendingProps;var m=Yh(r,ii.current);Mh(r,s),m=$2(null,r,u,e,m,s);var x=G2();return r.flags|=1,typeof m=="object"&&m!==null&&typeof m.render=="function"&&m.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,zi(u)?(x=!0,_v(r)):x=!1,r.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,j2(r),m.updater=r0,r.stateNode=m,m._reactInternals=r,dw(r,u,e,s),r=fw(null,r,u,!0,x,s)):(r.tag=0,kr&&x&&R2(r),mi(null,r,m,s),r=r.child),r;case 16:u=r.elementType;e:{switch($_(e,r),e=r.pendingProps,m=u._init,u=m(u._payload),r.type=u,m=r.tag=AN(u),e=qo(u,e),m){case 0:r=pw(null,r,u,e,s);break e;case 1:r=PC(null,r,u,e,s);break e;case 11:r=TC(null,r,u,e,s);break e;case 14:r=EC(null,r,u,qo(u.type,e),s);break e}throw Error(nt(306,u,""))}return r;case 0:return u=r.type,m=r.pendingProps,m=r.elementType===u?m:qo(u,m),pw(e,r,u,m,s);case 1:return u=r.type,m=r.pendingProps,m=r.elementType===u?m:qo(u,m),PC(e,r,u,m,s);case 3:e:{if(WR(r),e===null)throw Error(nt(387));u=r.pendingProps,x=r.memoizedState,m=x.element,vR(e,r),Sv(r,u,null,s);var v=r.memoizedState;if(u=v.element,x.isDehydrated)if(x={element:u,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},r.updateQueue.baseState=x,r.memoizedState=x,r.flags&256){m=tp(Error(nt(423)),r),r=CC(e,r,u,s,m);break e}else if(u!==m){m=tp(Error(nt(424)),r),r=CC(e,r,u,s,m);break e}else for(Ji=Hl(r.stateNode.containerInfo.firstChild),eo=r,kr=!0,Ho=null,s=yR(r,null,u,s),r.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Qh(),u===m){r=La(e,r,s);break e}mi(e,r,u,s)}r=r.child}return r;case 5:return xR(r),e===null&&lw(r),u=r.type,m=r.pendingProps,x=e!==null?e.memoizedProps:null,v=m.children,nw(u,m)?v=null:x!==null&&nw(u,x)&&(r.flags|=32),qR(e,r),mi(e,r,v,s),r.child;case 6:return e===null&&lw(r),null;case 13:return ZR(e,r,s);case 4:return N2(r,r.stateNode.containerInfo),u=r.pendingProps,e===null?r.child=Jh(r,null,u,s):mi(e,r,u,s),r.child;case 11:return u=r.type,m=r.pendingProps,m=r.elementType===u?m:qo(u,m),TC(e,r,u,m,s);case 7:return mi(e,r,r.pendingProps,s),r.child;case 8:return mi(e,r,r.pendingProps.children,s),r.child;case 12:return mi(e,r,r.pendingProps.children,s),r.child;case 10:e:{if(u=r.type._context,m=r.pendingProps,x=r.memoizedProps,v=m.value,br(bv,u._currentValue),u._currentValue=v,x!==null)if(Qo(x.value,v)){if(x.children===m.children&&!Li.current){r=La(e,r,s);break e}}else for(x=r.child,x!==null&&(x.return=r);x!==null;){var c=x.dependencies;if(c!==null){v=x.child;for(var A=c.firstContext;A!==null;){if(A.context===u){if(x.tag===1){A=Ma(-1,s&-s),A.tag=2;var L=x.updateQueue;if(L!==null){L=L.shared;var z=L.pending;z===null?A.next=A:(A.next=z.next,z.next=A),L.pending=A}}x.lanes|=s,A=x.alternate,A!==null&&(A.lanes|=s),cw(x.return,s,r),c.lanes|=s;break}A=A.next}}else if(x.tag===10)v=x.type===r.type?null:x.child;else if(x.tag===18){if(v=x.return,v===null)throw Error(nt(341));v.lanes|=s,c=v.alternate,c!==null&&(c.lanes|=s),cw(v,s,r),v=x.sibling}else v=x.child;if(v!==null)v.return=x;else for(v=x;v!==null;){if(v===r){v=null;break}if(x=v.sibling,x!==null){x.return=v.return,v=x;break}v=v.return}x=v}mi(e,r,m.children,s),r=r.child}return r;case 9:return m=r.type,u=r.pendingProps.children,Mh(r,s),m=To(m),u=u(m),r.flags|=1,mi(e,r,u,s),r.child;case 14:return u=r.type,m=qo(u,r.pendingProps),m=qo(u.type,m),EC(e,r,u,m,s);case 15:return $R(e,r,r.type,r.pendingProps,s);case 17:return u=r.type,m=r.pendingProps,m=r.elementType===u?m:qo(u,m),$_(e,r),r.tag=1,zi(u)?(e=!0,_v(r)):e=!1,Mh(r,s),BR(r,u,m),dw(r,u,m,s),fw(null,r,u,!0,e,s);case 19:return HR(e,r,s);case 22:return GR(e,r,s)}throw Error(nt(156,r.tag))};function uk(e,r){return FA(e,r)}function MN(e,r,s,u){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,571 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xo(e,r,s,u){return new MN(e,r,s,u)}function eS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function AN(e){if(typeof e=="function")return eS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===v2)return 11;if(e===x2)return 14}return 2}function Ql(e,r){var s=e.alternate;return s===null?(s=xo(e.tag,r,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=r,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,r=e.dependencies,s.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function W_(e,r,s,u,m,x){var v=2;if(u=e,typeof e=="function")eS(e)&&(v=1);else if(typeof e=="string")v=5;else e:switch(e){case ph:return Tu(s.children,m,x,r);case _2:v=8,m|=8;break;case z1:return e=xo(12,s,r,m|2),e.elementType=z1,e.lanes=x,e;case O1:return e=xo(13,s,r,m),e.elementType=O1,e.lanes=x,e;case F1:return e=xo(19,s,r,m),e.elementType=F1,e.lanes=x,e;case xA:return o0(s,m,x,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _A:v=10;break e;case vA:v=9;break e;case v2:v=11;break e;case x2:v=14;break e;case Il:v=16,u=null;break e}throw Error(nt(130,e==null?e:typeof e,""))}return r=xo(v,s,r,m),r.elementType=e,r.type=u,r.lanes=x,r}function Tu(e,r,s,u){return e=xo(7,e,u,r),e.lanes=s,e}function o0(e,r,s,u){return e=xo(22,e,u,r),e.elementType=xA,e.lanes=s,e.stateNode={isHidden:!1},e}function Vb(e,r,s){return e=xo(6,e,null,r),e.lanes=s,e}function Ub(e,r,s){return r=xo(4,e.children!==null?e.children:[],e.key,r),r.lanes=s,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function RN(e,r,s,u,m){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wb(0),this.expirationTimes=wb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wb(0),this.identifierPrefix=u,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function tS(e,r,s,u,m,x,v,c,A){return e=new RN(e,r,s,c,A),r===1?(r=1,x===!0&&(r|=8)):r=0,x=xo(3,null,null,r),e.current=x,x.stateNode=e,x.memoizedState={element:u,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},j2(x),e}function kN(e,r,s){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:hh,key:u==null?null:""+u,children:e,containerInfo:r,implementation:s}}function dk(e){if(!e)return rc;e=e._reactInternals;e:{if(zu(e)!==e||e.tag!==1)throw Error(nt(170));var r=e;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(zi(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(nt(171))}if(e.tag===1){var s=e.type;if(zi(s))return dR(e,s,r)}return r}function hk(e,r,s,u,m,x,v,c,A){return e=tS(s,u,!0,e,m,x,v,c,A),e.context=dk(null),s=e.current,u=yi(),m=Yl(s),x=Ma(u,m),x.callback=r??null,Xl(s,x,m),e.current.lanes=m,ig(e,m,u),Oi(e,u),e}function s0(e,r,s,u){var m=r.current,x=yi(),v=Yl(m);return s=dk(s),r.context===null?r.context=s:r.pendingContext=s,r=Ma(x,v),r.payload={element:e},u=u===void 0?null:u,u!==null&&(r.callback=u),e=Xl(m,r,v),e!==null&&(Ko(e,m,v,x),B_(e,m,v)),v}function Rv(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function FC(e,r){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<r?s:r}}function rS(e,r){FC(e,r),(e=e.alternate)&&FC(e,r)}function DN(){return null}var pk=typeof reportError=="function"?reportError:function(e){console.error(e)};function nS(e){this._internalRoot=e}a0.prototype.render=nS.prototype.render=function(e){var r=this._internalRoot;if(r===null)throw Error(nt(409));s0(e,r,null,null)};a0.prototype.unmount=nS.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var r=e.containerInfo;Mu(function(){s0(null,e,null,null)}),r[ka]=null}};function a0(e){this._internalRoot=e}a0.prototype.unstable_scheduleHydration=function(e){if(e){var r=GA();e={blockedOn:null,target:e,priority:r};for(var s=0;s<Al.length&&r!==0&&r<Al[s].priority;s++);Al.splice(s,0,e),s===0&&WA(e)}};function iS(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jC(){}function LN(e,r,s,u,m){if(m){if(typeof u=="function"){var x=u;u=function(){var L=Rv(v);x.call(L)}}var v=hk(r,u,e,0,null,!1,!1,"",jC);return e._reactRootContainer=v,e[ka]=v.current,zm(e.nodeType===8?e.parentNode:e),Mu(),v}for(;m=e.lastChild;)e.removeChild(m);if(typeof u=="function"){var c=u;u=function(){var L=Rv(A);c.call(L)}}var A=tS(e,0,!1,null,null,!1,!1,"",jC);return e._reactRootContainer=A,e[ka]=A.current,zm(e.nodeType===8?e.parentNode:e),Mu(function(){s0(r,A,s,u)}),A}function c0(e,r,s,u,m){var x=s._reactRootContainer;if(x){var v=x;if(typeof m=="function"){var c=m;m=function(){var A=Rv(v);c.call(A)}}s0(r,v,e,m)}else v=LN(s,r,e,m,u);return Rv(v)}UA=function(e){switch(e.tag){case 3:var r=e.stateNode;if(r.current.memoizedState.isDehydrated){var s=dm(r.pendingLanes);s!==0&&(S2(r,s|1),Oi(r,Xr()),!(Qt&6)&&(rp=Xr()+500,dc()))}break;case 13:Mu(function(){var u=Da(e,1);if(u!==null){var m=yi();Ko(u,e,1,m)}}),rS(e,1)}};T2=function(e){if(e.tag===13){var r=Da(e,134217728);if(r!==null){var s=yi();Ko(r,e,134217728,s)}rS(e,134217728)}};$A=function(e){if(e.tag===13){var r=Yl(e),s=Da(e,r);if(s!==null){var u=yi();Ko(s,e,r,u)}rS(e,r)}};GA=function(){return lr};qA=function(e,r){var s=lr;try{return lr=e,r()}finally{lr=s}};Z1=function(e,r,s){switch(r){case"input":if(B1(e,s),r=s.name,s.type==="radio"&&r!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<s.length;r++){var u=s[r];if(u!==e&&u.form===e.form){var m=Jv(u);if(!m)throw Error(nt(90));wA(u),B1(u,m)}}}break;case"textarea":TA(e,s);break;case"select":r=s.value,r!=null&&Eh(e,!!s.multiple,r,!1)}};RA=Y2;kA=Mu;var zN={usingClientEntryPoint:!1,Events:[sg,yh,Jv,MA,AA,Y2]},Jf={findFiberByHostInstance:cu,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ON={bundleType:Jf.bundleType,version:Jf.version,rendererPackageName:Jf.rendererPackageName,rendererConfig:Jf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Fa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zA(e),e===null?null:e.stateNode},findFiberByHostInstance:Jf.findFiberByHostInstance||DN,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var g_=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!g_.isDisabled&&g_.supportsFiber)try{Xv=g_.inject(ON),Rs=g_}catch{}}so.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zN;so.createPortal=function(e,r){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!iS(r))throw Error(nt(200));return kN(e,r,null,s)};so.createRoot=function(e,r){if(!iS(e))throw Error(nt(299));var s=!1,u="",m=pk;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onRecoverableError!==void 0&&(m=r.onRecoverableError)),r=tS(e,1,!1,null,null,s,!1,u,m),e[ka]=r.current,zm(e.nodeType===8?e.parentNode:e),new nS(r)};so.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var r=e._reactInternals;if(r===void 0)throw typeof e.render=="function"?Error(nt(188)):(e=Object.keys(e).join(","),Error(nt(268,e)));return e=zA(r),e=e===null?null:e.stateNode,e};so.flushSync=function(e){return Mu(e)};so.hydrate=function(e,r,s){if(!l0(r))throw Error(nt(200));return c0(null,e,r,!0,s)};so.hydrateRoot=function(e,r,s){if(!iS(e))throw Error(nt(405));var u=s!=null&&s.hydratedSources||null,m=!1,x="",v=pk;if(s!=null&&(s.unstable_strictMode===!0&&(m=!0),s.identifierPrefix!==void 0&&(x=s.identifierPrefix),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),r=hk(r,null,e,1,s??null,m,!1,x,v),e[ka]=r.current,zm(e),u)for(e=0;e<u.length;e++)s=u[e],m=s._getVersion,m=m(s._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[s,m]:r.mutableSourceEagerHydrationData.push(s,m);return new a0(r)};so.render=function(e,r,s){if(!l0(r))throw Error(nt(200));return c0(null,e,r,!1,s)};so.unmountComponentAtNode=function(e){if(!l0(e))throw Error(nt(40));return e._reactRootContainer?(Mu(function(){c0(null,null,e,!1,function(){e._reactRootContainer=null,e[ka]=null})}),!0):!1};so.unstable_batchedUpdates=Y2;so.unstable_renderSubtreeIntoContainer=function(e,r,s,u){if(!l0(s))throw Error(nt(200));if(e==null||e._reactInternals===void 0)throw Error(nt(38));return c0(e,r,s,!1,u)};so.version="18.3.1-next-f1338f8080-20240426";function fk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fk)}catch(e){console.error(e)}}fk(),fA.exports=so;var lg=fA.exports,mk,NC=lg;mk=NC.createRoot,NC.hydrateRoot;function FN(e,r){if(e instanceof RegExp)return{keys:!1,pattern:e};var s,u,m,x,v=[],c="",A=e.split("/");for(A[0]||A.shift();m=A.shift();)s=m[0],s==="*"?(v.push(s),c+=m[1]==="?"?"(?:/(.*))?":"/(.*)"):s===":"?(u=m.indexOf("?",1),x=m.indexOf(".",1),v.push(m.substring(1,~u?u:~x?x:m.length)),c+=~u&&!~x?"(?:/([^/]+?))?":"/([^/]+?)",~x&&(c+=(~u?"?":"")+"\\"+m.substring(x))):c+="/"+m;return{keys:v,pattern:new RegExp("^"+c+(r?"(?=$|/)":"/?$"),"i")}}var gk={exports:{}},yk={};/**
42 * @license React
43 * use-sync-external-store-shim.production.js
44 *
45 * Copyright (c) Meta Platforms, Inc. and affiliates.
46 *
47 * This source code is licensed under the MIT license found in the
48 * LICENSE file in the root directory of this source tree.
49 */var np=R;function jN(e,r){return e===r&&(e!==0||1/e===1/r)||e!==e&&r!==r}var NN=typeof Object.is=="function"?Object.is:jN,BN=np.useState,VN=np.useEffect,UN=np.useLayoutEffect,$N=np.useDebugValue;function GN(e,r){var s=r(),u=BN({inst:{value:s,getSnapshot:r}}),m=u[0].inst,x=u[1];return UN(function(){m.value=s,m.getSnapshot=r,$b(m)&&x({inst:m})},[e,s,r]),VN(function(){return $b(m)&&x({inst:m}),e(function(){$b(m)&&x({inst:m})})},[e]),$N(s),s}function $b(e){var r=e.getSnapshot;e=e.value;try{var s=r();return!NN(e,s)}catch{return!0}}function qN(e,r){return r()}var WN=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?qN:GN;
49yk.useSyncExternalStore=np.useSyncExternalStore!==void 0?np.useSyncExternalStore:WN;gk.exports=yk;var ZN=gk.exports;const HN=Hv.useInsertionEffect,XN=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",KN=XN?R.useLayoutEffect:R.useEffect,YN=HN||KN,_k=e=>{const r=R.useRef([e,(...s)=>r[0](...s)]).current;return YN(()=>{r[0]=e}),r[1]},QN="popstate",oS="pushState",sS="replaceState",JN="hashchange",BC=[QN,oS,sS,JN],e6=e=>{for(const r of BC)addEventListener(r,e);return()=>{for(const r of BC)removeEventListener(r,e)}},vk=(e,r)=>ZN.useSyncExternalStore(e6,e,r),VC=()=>location.search,t6=({ssrSearch:e}={})=>vk(VC,e!=null?()=>e:VC),UC=()=>location.pathname,r6=({ssrPath:e}={})=>vk(UC,e!=null?()=>e:UC),n6=(e,{replace:r=!1,state:s=null}={})=>history[r?sS:oS](s,"",e),i6=(e={})=>[r6(e),n6],$C=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[$C]>"u"){for(const e of[oS,sS]){const r=history[e];history[e]=function(){const s=r.apply(this,arguments),u=new Event(e);return u.arguments=arguments,dispatchEvent(u),s}}Object.defineProperty(window,$C,{value:!0})}const o6=(e,r)=>r.toLowerCase().indexOf(e.toLowerCase())?"~"+r:r.slice(e.length)||"/",xk=(e="")=>e==="/"?"":e,s6=(e,r)=>e[0]==="~"?e.slice(1):xk(r)+e,a6=(e="",r)=>o6(Pw(xk(e)),Pw(r)),l6=e=>e[0]==="?"?e.slice(1):e,Pw=e=>{try{return decodeURI(e)}catch{return e}},c6=e=>Pw(l6(e)),bk={hook:i6,searchHook:t6,parser:FN,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,r,s)=>e(r,s)},wk=R.createContext(bk),Ou=()=>R.useContext(wk),Sk={},Tk=R.createContext(Sk),u6=()=>R.useContext(Tk),u0=e=>{const[r,s]=e.hook(e);return[a6(e.base,r),_k((u,m)=>e.aroundNav(s,s6(u,e.base),m))]},hc=()=>u0(Ou()),TJ=()=>{const e=Ou();return c6(e.searchHook(e))},aS=(e,r,s,u)=>{const{pattern:m,keys:x}=r instanceof RegExp?{keys:!1,pattern:r}:e(r||"*",u),v=m.exec(s)||[],[c,...A]=v;return c!==void 0?[!0,(()=>{const L=x!==!1?Object.fromEntries(x.map((j,V)=>[j,A[V]])):v.groups;let z={...A};return L&&Object.assign(z,L),z})(),...u?[c]:[]]:[!1,null]},EJ=e=>aS(Ou().parser,e,hc()[0]),d6=({children:e,...r})=>{var z,j,V;const s=Ou(),u=r.hook?bk:s;let m=u;const[x,v=r.ssrSearch??""]=((z=r.ssrPath)==null?void 0:z.split("?"))??[];x&&(r.ssrSearch=v,r.ssrPath=x),r.hrefs=r.hrefs??((j=r.hook)==null?void 0:j.hrefs),r.searchHook=r.searchHook??((V=r.hook)==null?void 0:V.searchHook);let c=R.useRef({}),A=c.current,L=A;for(let Z in u){const K=Z==="base"?u[Z]+(r[Z]??""):r[Z]??u[Z];A===L&&K!==L[Z]&&(c.current=L={...L}),L[Z]=K,(K!==u[Z]||K!==m[Z])&&(m=L)}return R.createElement(wk.Provider,{value:m,children:e})},GC=({children:e,component:r},s)=>r?R.createElement(r,{params:s}):typeof e=="function"?e(s):e,h6=e=>{let r=R.useRef(Sk);const s=r.current;return r.current=Object.keys(e).length!==Object.keys(s).length||Object.entries(e).some(([u,m])=>m!==s[u])?e:s},ne=({path:e,nest:r,match:s,...u})=>{const m=Ou(),[x]=u0(m),[v,c,A]=s??aS(m.parser,e,x,r),L=h6({...u6(),...c});if(!v)return null;const z=A?R.createElement(d6,{base:A},GC(u,L)):GC(u,L);return R.createElement(Tk.Provider,{value:L,children:z})},hu=R.forwardRef((e,r)=>{const s=Ou(),[u,m]=u0(s),{to:x="",href:v=x,onClick:c,asChild:A,children:L,className:z,replace:j,state:V,transition:Z,...K}=e,Y=_k(Q=>{Q.ctrlKey||Q.metaKey||Q.altKey||Q.shiftKey||Q.button!==0||(c==null||c(Q),Q.defaultPrevented||(Q.preventDefault(),m(v,e)))}),ie=s.hrefs(v[0]==="~"?v.slice(1):s.base+v,s);return A&&R.isValidElement(L)?R.cloneElement(L,{onClick:Y,href:ie}):R.createElement("a",{...K,onClick:Y,href:ie,className:z!=null&&z.call?z(u===v):z,children:L,ref:r})}),Ek=e=>Array.isArray(e)?e.flatMap(r=>Ek(r&&r.type===R.Fragment?r.props.children:r)):[e],qC=({children:e,location:r})=>{const s=Ou(),[u]=u0(s);for(const m of Ek(e)){let x=0;if(R.isValidElement(m)&&(x=aS(s.parser,m.props.path,r||u,m.props.nest))[0])return R.cloneElement(m,{match:x})}return null};var pp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fu,kl,Fh,qM,p6=(qM=class extends pp{constructor(){super();St(this,fu);St(this,kl);St(this,Fh);dt(this,Fh,r=>{if(typeof window<"u"&&window.addEventListener){const s=()=>r();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){Te(this,kl)||this.setEventListener(Te(this,Fh))}onUnsubscribe(){var r;this.hasListeners()||((r=Te(this,kl))==null||r.call(this),dt(this,kl,void 0))}setEventListener(r){var s;dt(this,Fh,r),(s=Te(this,kl))==null||s.call(this),dt(this,kl,r(u=>{typeof u=="boolean"?this.setFocused(u):this.onFocus()}))}setFocused(r){Te(this,fu)!==r&&(dt(this,fu,r),this.onFocus())}onFocus(){const r=this.isFocused();
49this.listeners.forEach(s=>{s(r)})}isFocused(){var r;return typeof Te(this,fu)=="boolean"?Te(this,fu):((r=globalThis.document)==null?void 0:r.visibilityState)!=="hidden"}},fu=new WeakMap,kl=new WeakMap,Fh=new WeakMap,qM),lS=new p6,f6={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)},Dl,u2,WM,m6=(WM=class{constructor(){St(this,Dl,f6);St(this,u2,!1)}setTimeoutProvider(e){dt(this,Dl,e)}setTimeout(e,r){return Te(this,Dl).setTimeout(e,r)}clearTimeout(e){Te(this,Dl).clearTimeout(e)}setInterval(e,r){return Te(this,Dl).setInterval(e,r)}clearInterval(e){Te(this,Dl).clearInterval(e)}},Dl=new WeakMap,u2=new WeakMap,WM),pu=new m6;function g6(e){setTimeout(e,0)}var y6=typeof window>"u"||"Deno"in globalThis;function gi(){}function _6(e,r){return typeof e=="function"?e(r):e}function Cw(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pk(e,r){return Math.max(e+(r||0)-Date.now(),0)}function Jl(e,r){return typeof e=="function"?e(r):e}function Yi(e,r){return typeof e=="function"?e(r):e}function WC(e,r){const{type:s="all",exact:u,fetchStatus:m,predicate:x,queryKey:v,stale:c}=e;if(v){if(u){if(r.queryHash!==cS(v,r.options))return!1}else if(!Gm(r.queryKey,v))return!1}if(s!=="all"){const A=r.isActive();if(s==="active"&&!A||s==="inactive"&&A)return!1}return!(typeof c=="boolean"&&r.isStale()!==c||m&&m!==r.state.fetchStatus||x&&!x(r))}function ZC(e,r){const{exact:s,status:u,predicate:m,mutationKey:x}=e;if(x){if(!r.options.mutationKey)return!1;if(s){if(Au(r.options.mutationKey)!==Au(x))return!1}else if(!Gm(r.options.mutationKey,x))return!1}return!(u&&r.state.status!==u||m&&!m(r))}function cS(e,r){return((r==null?void 0:r.queryKeyHashFn)||Au)(e)}function Au(e){return JSON.stringify(e,(r,s)=>Iw(s)?Object.keys(s).sort().reduce((u,m)=>(u[m]=s[m],u),{}):s)}function Gm(e,r){return e===r?!0:typeof e!=typeof r?!1:e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(r).every(s=>Gm(e[s],r[s])):!1}var v6=Object.prototype.hasOwnProperty;function Ck(e,r,s=0){if(e===r)return e;if(s>500)return r;const u=HC(e)&&HC(r);if(!u&&!(Iw(e)&&Iw(r)))return r;const x=(u?e:Object.keys(e)).length,v=u?r:Object.keys(r),c=v.length,A=u?new Array(c):{};let L=0;for(let z=0;z<c;z++){const j=u?z:v[z],V=e[j],Z=r[j];if(V===Z){A[j]=V,(u?z<x:v6.call(e,j))&&L++;continue}if(V===null||Z===null||typeof V!="object"||typeof Z!="object"){A[j]=Z;continue}const K=Ck(V,Z,s+1);A[j]=K,K===V&&L++}return x===c&&L===x?e:A}function kv(e,r){if(!r||Object.keys(e).length!==Object.keys(r).length)return!1;for(const s in e)if(e[s]!==r[s])return!1;return!0}function HC(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Iw(e){if(!XC(e))return!1;const r=e.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!XC(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function XC(e){return Object.prototype.toString.call(e)==="[object Object]"}function x6(e){return new Promise(r=>{pu.setTimeout(r,e)})}function Mw(e,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,r):s.structuralSharing!==!1?Ck(e,r):r}function b6(e,r,s=0){const u=[...e,r];return s&&u.length>s?u.slice(1):u}function w6(e,r,s=0){const u=[r,...e];return s&&u.length>s?u.slice(0,-1):u}var uS=Symbol();function Ik(e,r){return!e.queryFn&&(r!=null&&r.initialPromise)?()=>r.initialPromise:!e.queryFn||e.queryFn===uS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function dS(e,r){return typeof e=="function"?e(...r):!!e}function S6(e,r,s){let u=!1,m;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(m??(m=r()),u||(u=!0,m.aborted?s():m.addEventListener("abort",s,{once:!0})),m)}),e}var qm=(()=>{let e=()=>y6;return{isServer(){return e()},setIsServer(r){e=r}}})();function Aw(){let e,r;const s=new Promise((m,x)=>{e=m,r=x});s.status="pending",s.catch(()=>{});function u(m){Object.assign(s,m),delete s.resolve,delete s.reject}return s.resolve=m=>{u({status:"fulfilled",value:m}),e(m)},s.reject=m=>{u({status:"rejected",reason:m}),r(m)},s}var T6=g6;function E6(){let e=[],r=0,s=c=>{c()},u=c=>{c()},m=T6;const x=c=>{r?e.push(c):m(()=>{s(c)})},v=()=>{const c=e;e=[],c.length&&m(()=>{u(()=>
49{c.forEach(A=>{s(A)})})})};return{batch:c=>{let A;r++;try{A=c()}finally{r--,r||v()}return A},batchCalls:c=>(...A)=>{x(()=>{c(...A)})},schedule:x,setNotifyFunction:c=>{s=c},setBatchNotifyFunction:c=>{u=c},setScheduler:c=>{m=c}}}var yn=E6(),jh,Ll,Nh,ZM,P6=(ZM=class extends pp{constructor(){super();St(this,jh,!0);St(this,Ll);St(this,Nh);dt(this,Nh,r=>{if(typeof window<"u"&&window.addEventListener){const s=()=>r(!0),u=()=>r(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",u,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",u)}}})}onSubscribe(){Te(this,Ll)||this.setEventListener(Te(this,Nh))}onUnsubscribe(){var r;this.hasListeners()||((r=Te(this,Ll))==null||r.call(this),dt(this,Ll,void 0))}setEventListener(r){var s;dt(this,Nh,r),(s=Te(this,Ll))==null||s.call(this),dt(this,Ll,r(this.setOnline.bind(this)))}setOnline(r){Te(this,jh)!==r&&(dt(this,jh,r),this.listeners.forEach(u=>{u(r)}))}isOnline(){return Te(this,jh)}},jh=new WeakMap,Ll=new WeakMap,Nh=new WeakMap,ZM),Dv=new P6;function C6(e){return Math.min(1e3*2**e,3e4)}function Mk(e){return(e??"online")==="online"?Dv.isOnline():!0}var Rw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ak(e){let r=!1,s=0,u;const m=Aw(),x=()=>m.status!=="pending",v=Y=>{var ie;if(!x()){const Q=new Rw(Y);V(Q),(ie=e.onCancel)==null||ie.call(e,Q)}},c=()=>{r=!0},A=()=>{r=!1},L=()=>lS.isFocused()&&(e.networkMode==="always"||Dv.isOnline())&&e.canRun(),z=()=>Mk(e.networkMode)&&e.canRun(),j=Y=>{x()||(u==null||u(),m.resolve(Y))},V=Y=>{x()||(u==null||u(),m.reject(Y))},Z=()=>new Promise(Y=>{var ie;u=Q=>{(x()||L())&&Y(Q)},(ie=e.onPause)==null||ie.call(e)}).then(()=>{var Y;u=void 0,x()||(Y=e.onContinue)==null||Y.call(e)}),K=()=>{if(x())return;let Y;const ie=s===0?e.initialPromise:void 0;try{Y=ie??e.fn()}catch(Q){Y=Promise.reject(Q)}Promise.resolve(Y).then(j).catch(Q=>{var xe;if(x())return;const G=e.retry??(qm.isServer()?0:3),J=e.retryDelay??C6,ue=typeof J=="function"?J(s,Q):J,ce=G===!0||typeof G=="number"&&s<G||typeof G=="function"&&G(s,Q);if(r||!ce){V(Q);return}s++,(xe=e.onFail)==null||xe.call(e,s,Q),x6(ue).then(()=>L()?void 0:Z()).then(()=>{r?V(Q):K()})})};return{promise:m,status:()=>m.status,cancel:v,continue:()=>(u==null||u(),m),cancelRetry:c,continueRetry:A,canStart:z,start:()=>(z()?K():Z().then(K),m)}}var mu,HM,Rk=(HM=class{constructor(){St(this,mu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Cw(this.gcTime)&&dt(this,mu,pu.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qm.isServer()?1/0:5*60*1e3))}clearGcTimeout(){Te(this,mu)!==void 0&&(pu.clearTimeout(Te(this,mu)),dt(this,mu,void 0))}},mu=new WeakMap,HM);function I6(e){return{onFetch:(r,s)=>{var z,j,V,Z,K;const u=r.options,m=(V=(j=(z=r.fetchOptions)==null?void 0:z.meta)==null?void 0:j.fetchMore)==null?void 0:V.direction,x=((Z=r.state.data)==null?void 0:Z.pages)||[],v=((K=r.state.data)==null?void 0:K.pageParams)||[];let c={pages:[],pageParams:[]},A=0;const L=async()=>{let Y=!1;const ie=J=>{S6(J,()=>r.signal,()=>Y=!0)},Q=Ik(r.options,r.fetchOptions),G=async(J,ue,ce)=>{if(Y)return Promise.reject(r.signal.reason);if(ue==null&&J.pages.length)return Promise.resolve(J);const Re=(()=>{const ve={client:r.client,queryKey:r.queryKey,pageParam:ue,direction:ce?"backward":"forward",meta:r.options.meta};return ie(ve),ve})(),Ce=await Q(Re),{maxPages:re}=r.options,se=ce?w6:b6;return{pages:se(J.pages,Ce,re),pageParams:se(J.pageParams,ue,re)}};if(m&&x.length){const J=m==="backward",ue=J?M6:KC,ce={pages:x,pageParams:v},xe=ue(u,ce);c=await G(ce,xe,J)}else{const J=e??x.length;do{const ue=A===0?v[0]??u.initialPageParam:KC(u,c);if(A>0&&ue==null)break;c=await G(c,ue),A++}while(A<J)}return c};r.options.persister?r.fetchFn=()=>{var Y,ie;return(ie=(Y=r.options).persister)==null?void 0:ie.call(Y,L,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s)}:r.fetchFn=L}}}function KC(e,{pages:r,pageParams:s}){const u=r.length-1;return r.length>0?e.getNextPageParam(r[u],r,s[u],s):void 0}function M6(e,{pages:r,pageParams:s}){var u;return r.length>0?(u=e.getPreviousPageParam)==null?void 0:u.call(e,r[0],r,s[0],s):void 0}var Bh,gu,Vh,yo,yu,Rn,Qm,_u,Ki,kk,ga,XM,A6=(XM=class extends Rk{constructor(r){super();St(this,Ki);St(this,Bh);St(this,gu);St(this,Vh);St(this,yo);St(this,yu);St(this,Rn);St(this,Qm);St(this,_u);dt(this,_u,!1),dt(this,Qm,r.defaultOptions),this.setOptions(r.options),this.observers=[],dt(this,yu,r.client),dt(this,yo,Te(this,yu).getQueryCache()),this.queryKey=r.queryKey,this.queryHash=r.queryHash,dt(this,gu,QC(this.options)),this.state=r.state??Te(this,gu),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return Te(this,Bh)}get promise(){var r;return(r=Te(this,Rn))==null?void 0:r.promise}setOptions(r){if(this.options={...Te(this,Qm),...r},r!=null&&r._type&&dt(this,Bh,r._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=QC(this.options);s.data!==void 0&&(this.setState(YC(s.data,s.dataUpdatedAt)),dt(this,gu,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Te(this,yo).remove(this)}setData(r,s){const u=Mw(this.state.data,r,this.options);return Ft(this,Ki,ga).call(this,{data:u,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),u}setState(r){Ft(this,Ki,ga).call(this,{type:"setState",state:r})}cancel(r){var u,m;const s=(u=Te(this,Rn))==null?void 0:u.promise;return(m=Te(this,Rn))==null||m.cancel(r),s?s.then(gi).catch(gi):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return Te(this,gu)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(r=>Yi(r.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
49Count>0}isStatic(){return this.getObserversCount()>0?this.observers.some(r=>Jl(r.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(r=>r.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(r=0){return this.state.data===void 0?!0:r==="static"?!1:this.state.isInvalidated?!0:!Pk(this.state.dataUpdatedAt,r)}onFocus(){var s;const r=this.observers.find(u=>u.shouldFetchOnWindowFocus());r==null||r.refetch({cancelRefetch:!1}),(s=Te(this,Rn))==null||s.continue()}onOnline(){var s;const r=this.observers.find(u=>u.shouldFetchOnReconnect());r==null||r.refetch({cancelRefetch:!1}),(s=Te(this,Rn))==null||s.continue()}addObserver(r){this.observers.includes(r)||(this.observers.push(r),this.clearGcTimeout(),Te(this,yo).notify({type:"observerAdded",query:this,observer:r}))}removeObserver(r){this.observers.includes(r)&&(this.observers=this.observers.filter(s=>s!==r),this.observers.length||(Te(this,Rn)&&(Te(this,_u)||Ft(this,Ki,kk).call(this)?Te(this,Rn).cancel({revert:!0}):Te(this,Rn).cancelRetry()),this.scheduleGc()),Te(this,yo).notify({type:"observerRemoved",query:this,observer:r}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ft(this,Ki,ga).call(this,{type:"invalidate"})}async fetch(r,s){var L,z,j,V,Z,K,Y,ie,Q,G,J;if(this.state.fetchStatus!=="idle"&&((L=Te(this,Rn))==null?void 0:L.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(Te(this,Rn))return Te(this,Rn).continueRetry(),Te(this,Rn).promise}if(r&&this.setOptions(r),!this.options.queryFn){const ue=this.observers.find(ce=>ce.options.queryFn);ue&&this.setOptions(ue.options)}const u=new AbortController,m=ue=>{Object.defineProperty(ue,"signal",{enumerable:!0,get:()=>(dt(this,_u,!0),u.signal)})},x=()=>{const ue=Ik(this.options,s),xe=(()=>{const Re={client:Te(this,yu),queryKey:this.queryKey,meta:this.meta};return m(Re),Re})();return dt(this,_u,!1),this.options.persister?this.options.persister(ue,xe,this):ue(xe)},c=(()=>{const ue={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:Te(this,yu),state:this.state,fetchFn:x};return m(ue),ue})(),A=Te(this,Bh)==="infinite"?I6(this.options.pages):this.options.behavior;A==null||A.onFetch(c,this),dt(this,Vh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((z=c.fetchOptions)==null?void 0:z.meta))&&Ft(this,Ki,ga).call(this,{type:"fetch",meta:(j=c.fetchOptions)==null?void 0:j.meta}),dt(this,Rn,Ak({initialPromise:s==null?void 0:s.initialPromise,fn:c.fetchFn,onCancel:ue=>{ue instanceof Rw&&ue.revert&&this.setState({...Te(this,Vh),fetchStatus:"idle"}),u.abort()},onFail:(ue,ce)=>{Ft(this,Ki,ga).call(this,{type:"failed",failureCount:ue,error:ce})},onPause:()=>{Ft(this,Ki,ga).call(this,{type:"pause"})},onContinue:()=>{Ft(this,Ki,ga).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const ue=await Te(this,Rn).start();if(ue===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(ue),(Z=(V=Te(this,yo).config).onSuccess)==null||Z.call(V,ue,this),(Y=(K=Te(this,yo).config).onSettled)==null||Y.call(K,ue,this.state.error,this),ue}catch(ue){if(ue instanceof Rw){if(ue.silent)return Te(this,Rn).promise;if(ue.revert){if(this.state.data===void 0)throw ue;return this.state.data}}throw Ft(this,Ki,ga).call(this,{type:"error",error:ue}),(Q=(ie=Te(this,yo).config).onError)==null||Q.call(ie,ue,this),(J=(G=Te(this,yo).config).onSettled)==null||J.call(G,this.state.data,ue,this),ue}finally{this.scheduleGc()}}},Bh=new WeakMap,gu=new WeakMap,Vh=new WeakMap,yo=new WeakMap,yu=new WeakMap,Rn=new WeakMap,Qm=new WeakMap,_u=new WeakMap,Ki=new WeakSet,kk=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ga=function(r){const s=u=>{switch(r.type){case"failed":return{...u,fetchFailureCount:r.failureCount,fetchFailureReason:r.error};case"pause":return{...u,fetchStatus:"paused"};case"continue":return{...u,fetchStatus:"fetching"};case"fetch":return{...u,...Dk(u.data,this.options),fetchMeta:r.meta??null};case"success":const m={...u,...YC(r.data,r.dataUpdatedAt),dataUpdateCount:u.dataUpdateCount+1,...!r.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return dt(this,Vh,r.manual?m:void 0),m;case"error":const x=r.error;
49return{...u,error:x,errorUpdateCount:u.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:u.fetchFailureCount+1,fetchFailureReason:x,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...u,isInvalidated:!0};case"setState":return{...u,...r.state}}};this.state=s(this.state),yn.batch(()=>{this.observers.forEach(u=>{u.onQueryUpdate()}),Te(this,yo).notify({query:this,type:"updated",action:r})})},XM);function Dk(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mk(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function YC(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function QC(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,s=r!==void 0,u=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?u??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Ai,Wt,Jm,fi,vu,Uh,wa,zl,eg,$h,Gh,xu,bu,Ol,qh,sr,pm,kw,Dw,Lw,zw,Ow,Fw,jw,Lk,KM,R6=(KM=class extends pp{constructor(r,s){super();St(this,sr);St(this,Ai);St(this,Wt);St(this,Jm);St(this,fi);St(this,vu);St(this,Uh);St(this,wa);St(this,zl);St(this,eg);St(this,$h);St(this,Gh);St(this,xu);St(this,bu);St(this,Ol);St(this,qh,new Set);this.options=s,dt(this,Ai,r),dt(this,zl,null),dt(this,wa,Aw()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Te(this,Wt).addObserver(this),JC(Te(this,Wt),this.options)?Ft(this,sr,pm).call(this):this.updateResult(),Ft(this,sr,zw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nw(Te(this,Wt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nw(Te(this,Wt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ft(this,sr,Ow).call(this),Ft(this,sr,Fw).call(this),Te(this,Wt).removeObserver(this)}setOptions(r){const s=this.options,u=Te(this,Wt);if(this.options=Te(this,Ai).defaultQueryOptions(r),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Yi(this.options.enabled,Te(this,Wt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ft(this,sr,jw).call(this),Te(this,Wt).setOptions(this.options),s._defaulted&&!kv(this.options,s)&&Te(this,Ai).getQueryCache().notify({type:"observerOptionsUpdated",query:Te(this,Wt),observer:this});const m=this.hasListeners();m&&eI(Te(this,Wt),u,this.options,s)&&Ft(this,sr,pm).call(this),this.updateResult(),m&&(Te(this,Wt)!==u||Yi(this.options.enabled,Te(this,Wt))!==Yi(s.enabled,Te(this,Wt))||Jl(this.options.staleTime,Te(this,Wt))!==Jl(s.staleTime,Te(this,Wt)))&&Ft(this,sr,kw).call(this);const x=Ft(this,sr,Dw).call(this);m&&(Te(this,Wt)!==u||Yi(this.options.enabled,Te(this,Wt))!==Yi(s.enabled,Te(this,Wt))||x!==Te(this,Ol))&&Ft(this,sr,Lw).call(this,x)}getOptimisticResult(r){const s=Te(this,Ai).getQueryCache().build(Te(this,Ai),r),u=this.createResult(s,r);return D6(this,u)&&(dt(this,fi,u),dt(this,Uh,this.options),dt(this,vu,Te(this,Wt).state)),u}getCurrentResult(){return Te(this,fi)}trackResult(r,s){return new Proxy(r,{get:(u,m)=>(this.trackProp(m),s==null||s(m),m==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Te(this,wa).status==="pending"&&Te(this,wa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(u,m))})}trackProp(r){Te(this,qh).add(r)}getCurrentQuery(){return Te(this,Wt)}refetch({...r}={}){return this.fetch({...r})}fetchOptimistic(r){const s=Te(this,Ai).defaultQueryOptions(r),u=Te(this,Ai).getQueryCache().build(Te(this,Ai),s);return u.fetch().then(()=>this.createResult(u,s))}fetch(r){return Ft(this,sr,pm).call(this,{...r,cancelRefetch:r.cancelRefetch??!0}).then(()=>(this.updateResult(),Te(this,fi)))}createResult(r,s){var re;
49const u=Te(this,Wt),m=this.options,x=Te(this,fi),v=Te(this,vu),c=Te(this,Uh),L=r!==u?r.state:Te(this,Jm),{state:z}=r;let j={...z},V=!1,Z;if(s._optimisticResults){const se=this.hasListeners(),ve=!se&&JC(r,s),Me=se&&eI(r,u,s,m);(ve||Me)&&(j={...j,...Dk(z.data,r.options)}),s._optimisticResults==="isRestoring"&&(j.fetchStatus="idle")}let{error:K,errorUpdatedAt:Y,status:ie}=j;Z=j.data;let Q=!1;if(s.placeholderData!==void 0&&Z===void 0&&ie==="pending"){let se;x!=null&&x.isPlaceholderData&&s.placeholderData===(c==null?void 0:c.placeholderData)?(se=x.data,Q=!0):se=typeof s.placeholderData=="function"?s.placeholderData((re=Te(this,Gh))==null?void 0:re.state.data,Te(this,Gh)):s.placeholderData,se!==void 0&&(ie="success",Z=Mw(x==null?void 0:x.data,se,s),V=!0)}if(s.select&&Z!==void 0&&!Q)if(x&&Z===(v==null?void 0:v.data)&&s.select===Te(this,eg))Z=Te(this,$h);else try{dt(this,eg,s.select),Z=s.select(Z),Z=Mw(x==null?void 0:x.data,Z,s),dt(this,$h,Z),dt(this,zl,null)}catch(se){dt(this,zl,se)}Te(this,zl)&&(K=Te(this,zl),Z=Te(this,$h),Y=Date.now(),ie="error");const G=j.fetchStatus==="fetching",J=ie==="pending",ue=ie==="error",ce=J&&G,xe=Z!==void 0,Ce={status:ie,fetchStatus:j.fetchStatus,isPending:J,isSuccess:ie==="success",isError:ue,isInitialLoading:ce,isLoading:ce,data:Z,dataUpdatedAt:j.dataUpdatedAt,error:K,errorUpdatedAt:Y,failureCount:j.fetchFailureCount,failureReason:j.fetchFailureReason,errorUpdateCount:j.errorUpdateCount,isFetched:r.isFetched(),isFetchedAfterMount:j.dataUpdateCount>L.dataUpdateCount||j.errorUpdateCount>L.errorUpdateCount,isFetching:G,isRefetching:G&&!J,isLoadingError:ue&&!xe,isPaused:j.fetchStatus==="paused",isPlaceholderData:V,isRefetchError:ue&&xe,isStale:hS(r,s),refetch:this.refetch,promise:Te(this,wa),isEnabled:Yi(s.enabled,r)!==!1};if(this.options.experimental_prefetchInRender){const se=Ce.data!==void 0,ve=Ce.status==="error"&&!se,Me=De=>{ve?De.reject(Ce.error):se&&De.resolve(Ce.data)},qe=()=>{const De=dt(this,wa,Ce.promise=Aw());Me(De)},$e=Te(this,wa);switch($e.status){case"pending":r.queryHash===u.queryHash&&Me($e);break;case"fulfilled":(ve||Ce.data!==$e.value)&&qe();break;case"rejected":(!ve||Ce.error!==$e.reason)&&qe();break}}return Ce}updateResult(){const r=Te(this,fi),s=this.createResult(Te(this,Wt),this.options);if(dt(this,vu,Te(this,Wt).state),dt(this,Uh,this.options),Te(this,vu).data!==void 0&&dt(this,Gh,Te(this,Wt)),kv(s,r))return;dt(this,fi,s);const u=()=>{if(!r)return!0;const{notifyOnChangeProps:m}=this.options,x=typeof m=="function"?m():m;if(x==="all"||!x&&!Te(this,qh).size)return!0;const v=new Set(x??Te(this,qh));return this.options.throwOnError&&v.add("error"),Object.keys(Te(this,fi)).some(c=>{const A=c;return Te(this,fi)[A]!==r[A]&&v.has(A)})};Ft(this,sr,Lk).call(this,{listeners:u()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ft(this,sr,zw).call(this)}},Ai=new WeakMap,Wt=new WeakMap,Jm=new WeakMap,fi=new WeakMap,vu=new WeakMap,Uh=new WeakMap,wa=new WeakMap,zl=new WeakMap,eg=new WeakMap,$h=new WeakMap,Gh=new WeakMap,xu=new WeakMap,bu=new WeakMap,Ol=new WeakMap,qh=new WeakMap,sr=new WeakSet,pm=function(r){Ft(this,sr,jw).call(this);let s=Te(this,Wt).fetch(this.options,r);return r!=null&&r.throwOnError||(s=s.catch(gi)),s},kw=function(){Ft(this,sr,Ow).call(this);const r=Jl(this.options.staleTime,Te(this,Wt));if(qm.isServer()||Te(this,fi).isStale||!Cw(r))return;const u=Pk(Te(this,fi).dataUpdatedAt,r)+1;dt(this,xu,pu.setTimeout(()=>{Te(this,fi).isStale||this.updateResult()},u))},Dw=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Te(this,Wt)):this.options.refetchInterval)??!1},Lw=function(r){Ft(this,sr,Fw).call(this),dt(this,Ol,r),!(qm.isServer()||Yi(this.options.enabled,Te(this,Wt))===!1||!Cw(Te(this,Ol))||Te(this,Ol)===0)&&dt(this,bu,pu.setInterval(()=>{(this.options.refetchIntervalInBackground||lS.isFocused())&&Ft(this,sr,pm).call(this)},Te(this,Ol)))},zw=function(){Ft(this,sr,kw).call(this),Ft(this,sr,Lw).call(this,Ft(this,sr,Dw).call(this))},Ow=function(){Te(this,xu)!==void 0&&(pu.clearTimeout(Te(this,xu)),dt(this,xu,void 0))},Fw=function(){Te(this,bu)!==void 0&&(pu.clearInterval(Te(this,bu)),dt(this,bu,void 0))},jw=function(){const r=Te(this,Ai).getQueryCache().build(Te(this,Ai),this.options);if(r===Te(this,Wt))return;const s=Te(this,Wt);dt(this,Wt,r),dt(this,Jm,r.state),this.hasListeners()&&(s==null||s.removeObserver(this),r.addObserver(this))},Lk=function(r){yn.batch(()=>
49{r.listeners&&this.listeners.forEach(s=>{s(Te(this,fi))}),Te(this,Ai).getQueryCache().notify({query:Te(this,Wt),type:"observerResultsUpdated"})})},KM);function k6(e,r){return Yi(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Yi(r.retryOnMount,e)===!1)}function JC(e,r){return k6(e,r)||e.state.data!==void 0&&Nw(e,r,r.refetchOnMount)}function Nw(e,r,s){if(Yi(r.enabled,e)!==!1&&Jl(r.staleTime,e)!=="static"){const u=typeof s=="function"?s(e):s;return u==="always"||u!==!1&&hS(e,r)}return!1}function eI(e,r,s,u){return(e!==r||Yi(u.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&hS(e,s)}function hS(e,r){return Yi(r.enabled,e)!==!1&&e.isStaleByTime(Jl(r.staleTime,e))}function D6(e,r){return!kv(e.getCurrentResult(),r)}var tg,Ts,ri,wu,Es,Pl,YM,L6=(YM=class extends Rk{constructor(r){super();St(this,Es);St(this,tg);St(this,Ts);St(this,ri);St(this,wu);dt(this,tg,r.client),this.mutationId=r.mutationId,dt(this,ri,r.mutationCache),dt(this,Ts,[]),this.state=r.state||zk(),this.setOptions(r.options),this.scheduleGc()}setOptions(r){this.options=r,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(r){Te(this,Ts).includes(r)||(Te(this,Ts).push(r),this.clearGcTimeout(),Te(this,ri).notify({type:"observerAdded",mutation:this,observer:r}))}removeObserver(r){dt(this,Ts,Te(this,Ts).filter(s=>s!==r)),this.scheduleGc(),Te(this,ri).notify({type:"observerRemoved",mutation:this,observer:r})}optionalRemove(){Te(this,Ts).length||(this.state.status==="pending"?this.scheduleGc():Te(this,ri).remove(this))}continue(){var r;return((r=Te(this,wu))==null?void 0:r.continue())??this.execute(this.state.variables)}async execute(r){var v,c,A,L,z,j,V,Z,K,Y,ie,Q,G,J,ue,ce,xe,Re;const s=()=>{Ft(this,Es,Pl).call(this,{type:"continue"})},u={client:Te(this,tg),meta:this.options.meta,mutationKey:this.options.mutationKey};dt(this,wu,Ak({fn:()=>this.options.mutationFn?this.options.mutationFn(r,u):Promise.reject(new Error("No mutationFn found")),onFail:(Ce,re)=>{Ft(this,Es,Pl).call(this,{type:"failed",failureCount:Ce,error:re})},onPause:()=>{Ft(this,Es,Pl).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Te(this,ri).canRun(this)}));const m=this.state.status==="pending",x=!Te(this,wu).canStart();try{if(m)s();else{Ft(this,Es,Pl).call(this,{type:"pending",variables:r,isPaused:x}),Te(this,ri).config.onMutate&&await Te(this,ri).config.onMutate(r,this,u);const re=await((c=(v=this.options).onMutate)==null?void 0:c.call(v,r,u));re!==this.state.context&&Ft(this,Es,Pl).call(this,{type:"pending",context:re,variables:r,isPaused:x})}const Ce=await Te(this,wu).start();return await((L=(A=Te(this,ri).config).onSuccess)==null?void 0:L.call(A,Ce,r,this.state.context,this,u)),await((j=(z=this.options).onSuccess)==null?void 0:j.call(z,Ce,r,this.state.context,u)),await((Z=(V=Te(this,ri).config).onSettled)==null?void 0:Z.call(V,Ce,null,this.state.variables,this.state.context,this,u)),await((Y=(K=this.options).onSettled)==null?void 0:Y.call(K,Ce,null,r,this.state.context,u)),Ft(this,Es,Pl).call(this,{type:"success",data:Ce}),Ce}catch(Ce){try{await((Q=(ie=Te(this,ri).config).onError)==null?void 0:Q.call(ie,Ce,r,this.state.context,this,u))}catch(re){Promise.reject(re)}try{await((J=(G=this.options).onError)==null?void 0:J.call(G,Ce,r,this.state.context,u))}catch(re){Promise.reject(re)}try{await((ce=(ue=Te(this,ri).config).onSettled)==null?void 0:ce.call(ue,void 0,Ce,this.state.variables,this.state.context,this,u))}catch(re){Promise.reject(re)}try{await((Re=(xe=this.options).onSettled)==null?void 0:Re.call(xe,void 0,Ce,r,this.state.context,u))}catch(re){Promise.reject(re)}throw Ft(this,Es,Pl).call(this,{type:"error",error:Ce}),Ce}finally{Te(this,ri).runNext(this)}}},tg=new WeakMap,Ts=new WeakMap,ri=new WeakMap,wu=new WeakMap,Es=new WeakSet,Pl=function(r){const s=u=>{switch(r.type){case"failed":return{...u,failureCount:r.failureCount,failureReason:r.error};
49case"pause":return{...u,isPaused:!0};case"continue":return{...u,isPaused:!1};case"pending":return{...u,context:r.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:r.isPaused,status:"pending",variables:r.variables,submittedAt:Date.now()};case"success":return{...u,data:r.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...u,data:void 0,error:r.error,failureCount:u.failureCount+1,failureReason:r.error,isPaused:!1,status:"error"}}};this.state=s(this.state),yn.batch(()=>{Te(this,Ts).forEach(u=>{u.onMutationUpdate(r)}),Te(this,ri).notify({mutation:this,type:"updated",action:r})})},YM);function zk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sa,Wo,rg,QM,z6=(QM=class extends pp{constructor(r={}){super();St(this,Sa);St(this,Wo);St(this,rg);this.config=r,dt(this,Sa,new Set),dt(this,Wo,new Map),dt(this,rg,0)}build(r,s,u){const m=new L6({client:r,mutationCache:this,mutationId:++Jy(this,rg)._,options:r.defaultMutationOptions(s),state:u});return this.add(m),m}add(r){Te(this,Sa).add(r);const s=y_(r);if(typeof s=="string"){const u=Te(this,Wo).get(s);u?u.push(r):Te(this,Wo).set(s,[r])}this.notify({type:"added",mutation:r})}remove(r){if(Te(this,Sa).delete(r)){const s=y_(r);if(typeof s=="string"){const u=Te(this,Wo).get(s);if(u)if(u.length>1){const m=u.indexOf(r);m!==-1&&u.splice(m,1)}else u[0]===r&&Te(this,Wo).delete(s)}}this.notify({type:"removed",mutation:r})}canRun(r){const s=y_(r);if(typeof s=="string"){const u=Te(this,Wo).get(s),m=u==null?void 0:u.find(x=>x.state.status==="pending");return!m||m===r}else return!0}runNext(r){var u;const s=y_(r);if(typeof s=="string"){const m=(u=Te(this,Wo).get(s))==null?void 0:u.find(x=>x!==r&&x.state.isPaused);return(m==null?void 0:m.continue())??Promise.resolve()}else return Promise.resolve()}clear(){yn.batch(()=>{Te(this,Sa).forEach(r=>{this.notify({type:"removed",mutation:r})}),Te(this,Sa).clear(),Te(this,Wo).clear()})}getAll(){return Array.from(Te(this,Sa))}find(r){const s={exact:!0,...r};return this.getAll().find(u=>ZC(s,u))}findAll(r={}){return this.getAll().filter(s=>ZC(r,s))}notify(r){yn.batch(()=>{this.listeners.forEach(s=>{s(r)})})}resumePausedMutations(){const r=this.getAll().filter(s=>s.state.isPaused);return yn.batch(()=>Promise.all(r.map(s=>s.continue().catch(gi))))}},Sa=new WeakMap,Wo=new WeakMap,rg=new WeakMap,QM);function y_(e){var r;return(r=e.options.scope)==null?void 0:r.id}var Ta,Fl,Ri,Ea,Aa,Z_,Bw,JM,O6=(JM=class extends pp{constructor(s,u){super();St(this,Aa);St(this,Ta);St(this,Fl);St(this,Ri);St(this,Ea);dt(this,Ta,s),this.setOptions(u),this.bindMethods(),Ft(this,Aa,Z_).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var m;const u=this.options;this.options=Te(this,Ta).defaultMutationOptions(s),kv(this.options,u)||Te(this,Ta).getMutationCache().notify({type:"observerOptionsUpdated",mutation:Te(this,Ri),observer:this}),u!=null&&u.mutationKey&&this.options.mutationKey&&Au(u.mutationKey)!==Au(this.options.mutationKey)?this.reset():((m=Te(this,Ri))==null?void 0:m.state.status)==="pending"&&Te(this,Ri).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=Te(this,Ri))==null||s.removeObserver(this)}onMutationUpdate(s){Ft(this,Aa,Z_).call(this),Ft(this,Aa,Bw).call(this,s)}getCurrentResult(){return Te(this,Fl)}reset(){var s;(s=Te(this,Ri))==null||s.removeObserver(this),dt(this,Ri,void 0),Ft(this,Aa,Z_).call(this),Ft(this,Aa,Bw).call(this)}mutate(s,u){var m;return dt(this,Ea,u),(m=Te(this,Ri))==null||m.removeObserver(this),dt(this,Ri,Te(this,Ta).getMutationCache().build(Te(this,Ta),this.options)),Te(this,Ri).addObserver(this),Te(this,Ri).execute(s)}},Ta=new WeakMap,Fl=new WeakMap,Ri=new WeakMap,Ea=new WeakMap,Aa=new WeakSet,Z_=function(){var u;const s=((u=Te(this,Ri))==null?void 0:u.state)??zk();dt(this,Fl,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},Bw=function(s){yn.batch(()=>{var u,m,x,v,c,A,L,z;if(Te(this,Ea)&&this.hasListeners()){const j=Te(this,Fl).variables,V=Te(this,Fl).context,Z={client:Te(this,Ta),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(m=(u=Te(this,Ea)).onSuccess)==null||m.call(u,s.data,j,V,Z)}catch(K){Promise.reject(K)}
49try{(v=(x=Te(this,Ea)).onSettled)==null||v.call(x,s.data,null,j,V,Z)}catch(K){Promise.reject(K)}}else if((s==null?void 0:s.type)==="error"){try{(A=(c=Te(this,Ea)).onError)==null||A.call(c,s.error,j,V,Z)}catch(K){Promise.reject(K)}try{(z=(L=Te(this,Ea)).onSettled)==null||z.call(L,void 0,s.error,j,V,Z)}catch(K){Promise.reject(K)}}}this.listeners.forEach(j=>{j(Te(this,Fl))})})},JM),Ps,eA,F6=(eA=class extends pp{constructor(r={}){super();St(this,Ps);this.config=r,dt(this,Ps,new Map)}build(r,s,u){const m=s.queryKey,x=s.queryHash??cS(m,s);let v=this.get(x);return v||(v=new A6({client:r,queryKey:m,queryHash:x,options:r.defaultQueryOptions(s),state:u,defaultOptions:r.getQueryDefaults(m)}),this.add(v)),v}add(r){Te(this,Ps).has(r.queryHash)||(Te(this,Ps).set(r.queryHash,r),this.notify({type:"added",query:r}))}remove(r){const s=Te(this,Ps).get(r.queryHash);s&&(r.destroy(),s===r&&Te(this,Ps).delete(r.queryHash),this.notify({type:"removed",query:r}))}clear(){yn.batch(()=>{this.getAll().forEach(r=>{this.remove(r)})})}get(r){return Te(this,Ps).get(r)}getAll(){return[...Te(this,Ps).values()]}find(r){const s={exact:!0,...r};return this.getAll().find(u=>WC(s,u))}findAll(r={}){const s=this.getAll();return Object.keys(r).length>0?s.filter(u=>WC(r,u)):s}notify(r){yn.batch(()=>{this.listeners.forEach(s=>{s(r)})})}onFocus(){yn.batch(()=>{this.getAll().forEach(r=>{r.onFocus()})})}onOnline(){yn.batch(()=>{this.getAll().forEach(r=>{r.onOnline()})})}},Ps=new WeakMap,eA),Gr,jl,Nl,Wh,Zh,Bl,Hh,Xh,tA,j6=(tA=class{constructor(e={}){St(this,Gr);St(this,jl);St(this,Nl);St(this,Wh);St(this,Zh);St(this,Bl);St(this,Hh);St(this,Xh);dt(this,Gr,e.queryCache||new F6),dt(this,jl,e.mutationCache||new z6),dt(this,Nl,e.defaultOptions||{}),dt(this,Wh,new Map),dt(this,Zh,new Map),dt(this,Bl,0)}mount(){Jy(this,Bl)._++,Te(this,Bl)===1&&(dt(this,Hh,lS.subscribe(async e=>{e&&(await this.resumePausedMutations(),Te(this,Gr).onFocus())})),dt(this,Xh,Dv.subscribe(async e=>{e&&(await this.resumePausedMutations(),Te(this,Gr).onOnline())})))}unmount(){var e,r;Jy(this,Bl)._--,Te(this,Bl)===0&&((e=Te(this,Hh))==null||e.call(this),dt(this,Hh,void 0),(r=Te(this,Xh))==null||r.call(this),dt(this,Xh,void 0))}isFetching(e){return Te(this,Gr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Te(this,jl).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const r=this.defaultQueryOptions({queryKey:e});return(s=Te(this,Gr).get(r.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),s=Te(this,Gr).build(this,r),u=s.state.data;return u===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Jl(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(u))}getQueriesData(e){return Te(this,Gr).findAll(e).map(({queryKey:r,state:s})=>{const u=s.data;return[r,u]})}setQueryData(e,r,s){const u=this.defaultQueryOptions({queryKey:e}),m=Te(this,Gr).get(u.queryHash),x=m==null?void 0:m.state.data,v=_6(r,x);if(v!==void 0)return Te(this,Gr).build(this,u).setData(v,{...s,manual:!0})}setQueriesData(e,r,s){return yn.batch(()=>Te(this,Gr).findAll(e).map(({queryKey:u})=>[u,this.setQueryData(u,r,s)]))}getQueryState(e){var s;const r=this.defaultQueryOptions({queryKey:e});return(s=Te(this,Gr).get(r.queryHash))==null?void 0:s.state}removeQueries(e){const r=Te(this,Gr);yn.batch(()=>{r.findAll(e).forEach(s=>{r.remove(s)})})}resetQueries(e,r){const s=Te(this,Gr);return yn.batch(()=>(s.findAll(e).forEach(u=>{u.reset()}),this.refetchQueries({type:"active",...e},r)))}cancelQueries(e,r={}){const s={revert:!0,...r},u=yn.batch(()=>Te(this,Gr).findAll(e).map(m=>m.cancel(s)));return Promise.all(u).then(gi).catch(gi)}invalidateQueries(e,r={}){return yn.batch(()=>(Te(this,Gr).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},r)))}refetchQueries(e,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},u=yn.batch(()=>Te(this,Gr).findAll(e).filter(m=>!m.isDisabled()&&!m.isStatic()).map(m=>{let x=m.fetch(void 0,s);return s.throwOnError||(x=x.catch(gi)),m.state.fetchStatus==="paused"?Promise.resolve():x}));return Promise.all(u).then(gi)}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const s=Te(this,Gr).build(this,r);
49return s.isStaleByTime(Jl(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gi).catch(gi)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gi).catch(gi)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Dv.isOnline()?Te(this,jl).resumePausedMutations():Promise.resolve()}getQueryCache(){return Te(this,Gr)}getMutationCache(){return Te(this,jl)}getDefaultOptions(){return Te(this,Nl)}setDefaultOptions(e){dt(this,Nl,e)}setQueryDefaults(e,r){Te(this,Wh).set(Au(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...Te(this,Wh).values()],s={};return r.forEach(u=>{Gm(e,u.queryKey)&&Object.assign(s,u.defaultOptions)}),s}setMutationDefaults(e,r){Te(this,Zh).set(Au(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...Te(this,Zh).values()],s={};return r.forEach(u=>{Gm(e,u.mutationKey)&&Object.assign(s,u.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const r={...Te(this,Nl).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=cS(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===uS&&(r.enabled=!1),r}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Te(this,Nl).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Te(this,Gr).clear(),Te(this,jl).clear()}},Gr=new WeakMap,jl=new WeakMap,Nl=new WeakMap,Wh=new WeakMap,Zh=new WeakMap,Bl=new WeakMap,Hh=new WeakMap,Xh=new WeakMap,tA),Ok=R.createContext(void 0),pS=e=>{const r=R.useContext(Ok);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},N6=({client:e,children:r})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),M.jsx(Ok.Provider,{value:e,children:r})),Fk=R.createContext(!1),B6=()=>R.useContext(Fk);Fk.Provider;function V6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var U6=R.createContext(V6()),$6=()=>R.useContext(U6),G6=(e,r,s)=>{const u=s!=null&&s.state.error&&typeof e.throwOnError=="function"?dS(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||u)&&(r.isReset()||(e.retryOnMount=!1))},q6=e=>{R.useEffect(()=>{e.clearReset()},[e])},W6=({result:e,errorResetBoundary:r,throwOnError:s,query:u,suspense:m})=>e.isError&&!r.isReset()&&!e.isFetching&&u&&(m&&e.data===void 0||dS(s,[e.error,u])),Z6=e=>{if(e.suspense){const s=m=>m==="static"?m:Math.max(m??1e3,1e3),u=e.staleTime;e.staleTime=typeof u=="function"?(...m)=>s(u(...m)):s(u),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},H6=(e,r)=>e.isLoading&&e.isFetching&&!r,X6=(e,r)=>(e==null?void 0:e.suspense)&&r.isPending,tI=(e,r,s)=>r.fetchOptimistic(e).catch(()=>{s.clearReset()});function K6(e,r,s){var Z,K,Y,ie;const u=B6(),m=$6(),x=pS(),v=x.defaultQueryOptions(e);(K=(Z=x.getDefaultOptions().queries)==null?void 0:Z._experimental_beforeQuery)==null||K.call(Z,v);const c=x.getQueryCache().get(v.queryHash),A=e.subscribed!==!1;v._optimisticResults=u?"isRestoring":A?"optimistic":void 0,Z6(v),G6(v,m,c),q6(m);const L=!x.getQueryCache().get(v.queryHash),[z]=R.useState(()=>new r(x,v)),j=z.getOptimisticResult(v),V=!u&&A;if(R.useSyncExternalStore(R.useCallback(Q=>{const G=V?z.subscribe(yn.batchCalls(Q)):gi;return z.updateResult(),G},[z,V]),()=>z.getCurrentResult(),()=>z.getCurrentResult()),R.useEffect(()=>{z.setOptions(v)},[v,z]),X6(v,j))throw tI(v,z,m);if(W6({result:j,errorResetBoundary:m,throwOnError:v.throwOnError,query:c,suspense:v.suspense}))throw j.error;if((ie=(Y=x.getDefaultOptions().queries)==null?void 0:Y._experimental_afterQuery)==null||ie.call(Y,v,j),v.experimental_prefetchInRender&&!qm.isServer()&&H6(j,u)){const Q=L?tI(v,z,m):c==null?void 0:c.promise;Q==null||Q.catch(gi).finally(()=>{z.updateResult()})}return v.notifyOnChangeProps?j:z.trackResult(j)}function ip(e,r){return K6(e,R6)}function H_(e,r){const s=pS(),[u]=R.useState(()=>new O6(s,e));R.useEffect(()=>{u.setOptions(e)},[u,e]);const m=R.useSyncExternalStore(R.useCallback(v=>u.subscribe(yn.batchCalls(v)),[u]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x=R.useCallback((v,c)=>{u.mutate(v,c).catch(gi)},[u]);if(m.error&&dS(u.options.throwOnError,[m.error]))throw m.error;return{...m,mutate:x,mutateAsync:m.mutate}}const Y6="slant-offline",Q6=3,$t={cache:"cache",syncQueue:"syncQueue",metadata:"metadata",walletTickets:"walletTickets"};let __=null;function Ls(){return __||(__=new Promise((e,r)=>{const s=indexedDB.open(Y6,Q6);s.onerror=()=>
49{console.error("Failed to open IndexedDB:",s.error),r(s.error)},s.onsuccess=()=>{e(s.result)},s.onupgradeneeded=u=>{var x;const m=u.target.result;if(!m.objectStoreNames.contains($t.cache)){const v=m.createObjectStore($t.cache,{keyPath:"key"});v.createIndex("timestamp","timestamp",{unique:!1}),v.createIndex("userId","userId",{unique:!1})}if(!m.objectStoreNames.contains($t.syncQueue)){const v=m.createObjectStore($t.syncQueue,{keyPath:"id",autoIncrement:!0});v.createIndex("createdAt","createdAt",{unique:!1}),v.createIndex("status","status",{unique:!1})}if(m.objectStoreNames.contains($t.metadata)||m.createObjectStore($t.metadata,{keyPath:"key"}),!m.objectStoreNames.contains($t.walletTickets)){const v=m.createObjectStore($t.walletTickets,{keyPath:"id"});v.createIndex("userId","userId",{unique:!1}),v.createIndex("chainId","chainId",{unique:!1}),v.createIndex("status","status",{unique:!1})}u.oldVersion<3&&m.objectStoreNames.contains($t.walletTickets)&&((x=u.target.transaction)==null||x.objectStore($t.walletTickets).clear())}}),__)}async function J6(e){try{const r=await Ls();return new Promise((s,u)=>{const v=r.transaction($t.cache,"readonly").objectStore($t.cache).get(e);v.onsuccess=()=>{const c=v.result;if(!c){s(null);return}if(c.expiresAt&&Date.now()>c.expiresAt){s(null);return}s(c.data)},v.onerror=()=>u(v.error)})}catch(r){return console.error("Error reading from cache:",r),null}}async function eB(e,r,s={}){try{const u=await Ls();return new Promise((m,x)=>{const c=u.transaction($t.cache,"readwrite").objectStore($t.cache),A={key:e,data:r,timestamp:Date.now(),userId:s.userId,expiresAt:s.ttlMs?Date.now()+s.ttlMs:void 0},L=c.put(A);L.onsuccess=()=>m(),L.onerror=()=>x(L.error)})}catch(u){console.error("Error writing to cache:",u)}}async function tB(e){try{const r=await Ls();return new Promise((s,u)=>{const x=r.transaction($t.syncQueue,"readwrite").objectStore($t.syncQueue),v={...e,createdAt:Date.now(),status:"pending",retryCount:0},c=x.add(v);c.onsuccess=()=>s(c.result),c.onerror=()=>u(c.error)})}catch(r){throw console.error("Error adding to sync queue:",r),r}}async function jk(){try{const e=await Ls();return new Promise((r,s)=>{const x=e.transaction($t.syncQueue,"readonly").objectStore($t.syncQueue).getAll();x.onsuccess=()=>r(x.result||[]),x.onerror=()=>s(x.error)})}catch(e){return console.error("Error reading sync queue:",e),[]}}async function Gb(e,r){try{const s=await Ls();return new Promise((u,m)=>{const v=s.transaction($t.syncQueue,"readwrite").objectStore($t.syncQueue),c=v.get(e);c.onsuccess=()=>{const A=c.result;if(!A){u();return}const L={...A,...r},z=v.put(L);z.onsuccess=()=>u(),z.onerror=()=>m(z.error)},c.onerror=()=>m(c.error)})}catch(s){console.error("Error updating sync queue item:",s)}}async function rI(e){try{const r=await Ls();return new Promise((s,u)=>{const v=r.transaction($t.syncQueue,"readwrite").objectStore($t.syncQueue).delete(e);v.onsuccess=()=>s(),v.onerror=()=>u(v.error)})}catch(r){console.error("Error removing from sync queue:",r)}}async function rB(){try{const e=await Ls();await Promise.all([new Promise((r,s)=>{const m=e.transaction($t.cache,"readwrite").objectStore($t.cache).clear();m.onsuccess=()=>r(),m.onerror=()=>s(m.error)}),new Promise((r,s)=>{const m=e.transaction($t.walletTickets,"readwrite").objectStore($t.walletTickets).clear();m.onsuccess=()=>r(),m.onerror=()=>s(m.error)}),new Promise((r,s)=>{const m=e.transaction($t.syncQueue,"readwrite").objectStore($t.syncQueue).clear();m.onsuccess=()=>r(),m.onerror=()=>s(m.error)}),new Promise((r,s)=>{const m=e.transaction($t.metadata,"readwrite").objectStore($t.metadata).clear();m.onsuccess=()=>r(),m.onerror=()=>s(m.error)})])}catch(e){console.error("Error clearing all data:",e)}}const nB=15*60*1e3;async function CJ(e){const s=(await Ls()).transaction($t.walletTickets,"readwrite"),u=s.objectStore($t.walletTickets);for(const m of e){const{credentialValue:x,...v}=m;u.put({...v,presentation:{allowed:!1,state:"offline_metadata_only"},cachedAt:Date.now(),expiresAt:Date.now()+nB})}return new Promise((m,x)=>{s.oncomplete=()=>m(),s.onerror=()=>x(s.error)})}async function IJ(e){const r=await Ls();return new Promise((s,u)=>{const v=r.transaction($t.walletTickets,"readwrite").objectStore($t.walletTickets).index("userId").openCursor(IDBKeyRange.only(e));v.onsuccess=()=>{const c=v.result;c?(c.delete(),c.continue()):s()},v.onerror=()=>u(v.error)})}async function MJ(e){const r=await Ls();return new Promise((s,u)=>{const m=r.transaction($t.walletTickets,"readwrite"),v=m.objectStore($t.walletTickets).index("userId").getAll(e);v.onsuccess=()=>{const c=Date.now(),A=v.result.filter(L=>{const z=!L.expiresAt||L.expiresAt>c;return z||m.objectStore($t.walletTickets).delete(L.id),z}).map(({credentialValue:L,...z})=>z);s(A)},v.onerror=()=>u(v.error)})}const iB=24*60*60*1e3,oB=[/^\/api\/routes$/,/^\/api\/routes\/\d+$/,/^\/api\/itinerary\//,/^\/api\/destinations$/,/^\/api\/destinations\/\d+$/,/^\/api\/destinations\/popular$/,/^\/api\/saved-places$/,/^\/api\/user$/,/^\/api\/auth\/user$/,/^\/api\/group-trips$/,/^\/api\/group-trips\/\d+$/,/^\/api\/booking-offers\/saved$/,/^\/api\/notes$/,/^\/api\/checklists$/];
49function sB(e){const r=new URL(e,window.location.origin).pathname;return oB.some(s=>s.test(r))}function Nk(e){return e.map(r=>typeof r=="object"&&r!==null?JSON.stringify(r):String(r)).join("::")}async function aB(e){const r=Nk(e);return J6(r)}async function lB(e,r,s){const u=Nk(e);await eB(u,r,{userId:s,ttlMs:iB})}async function nI(e,r,s,u){return tB({method:e,url:r,body:s,headers:{"Content-Type":"application/json"},queryKey:u})}async function Bk(){return(await jk()).filter(r=>r.status==="pending").length}async function cB(e){const s=(await jk()).filter(x=>x.status!=="syncing");let u=0,m=0;for(let x=0;x<s.length;x++){const v=s[x];try{await Gb(v.id,{status:"syncing"});const c=await fetch(v.url,{method:v.method,headers:v.headers,body:v.body?JSON.stringify(v.body):void 0,credentials:"include"});c.ok?(await rI(v.id),u++):c.status>=400&&c.status<500?(await rI(v.id),m++):(await Gb(v.id,{status:"failed",retryCount:v.retryCount+1}),m++)}catch(c){console.error("Sync error for item:",v.id,c),await Gb(v.id,{status:"failed",retryCount:v.retryCount+1}),m++}}return{success:u,failed:m}}function uB(){"serviceWorker"in navigator&&"sync"in window.SyncManager&&navigator.serviceWorker.ready.then(e=>e.sync.register("slant-sync")).catch(e=>{console.log("Background sync registration failed:",e)})}let X_=!1,Em=[];function dB(e){return Em.push(e),()=>{Em=Em.filter(r=>r!==e)}}function hB(){return X_}async function Lv(){if(X_)return{success:0,failed:0};X_=!0,Em.forEach(e=>e(!0));try{const e=await cB();return Em.forEach(r=>r(!1,e)),e}finally{X_=!1}}typeof window<"u"&&(window.addEventListener("online",()=>{setTimeout(()=>{Lv().catch(console.error)},1e3)}),"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",e=>{e.data&&e.data.type==="SYNC_REQUESTED"&&Lv().catch(console.error)}));function pB(){uB(),Bk().then(e=>{e>0&&navigator.onLine&&Lv().catch(console.error)}).catch(console.error)}async function Vk(e){var r;if(!e.ok){const s=await e.text()||e.statusText,u=new Error(`${e.status}: ${s}`);u.status=e.status;try{u.body=JSON.parse(s)}catch{u.body=null}throw(r=u.body)!=null&&r.conflict&&(u.conflict=!0,u.conflictingCampaignId=u.body.conflictingCampaignId),u}}function Uk(){const e=document.cookie.match(/(?:^|;\s*)csrf-token=([^;]*)/);return e?e[1]:null}const fB=["POST","PUT","PATCH","DELETE"],mB=window.fetch.bind(window);window.fetch=function(r,s){const u=((s==null?void 0:s.method)||"GET").toUpperCase();if(fB.includes(u)){const m=Uk();if(m){const x=new Headers((s==null?void 0:s.headers)||{});x.has("x-csrf-token")||x.set("x-csrf-token",m),s={...s,headers:x}}}return mB(r,s)};async function Rh(e,r,s){const u=navigator.onLine;if(!u&&e!=="GET")return await nI(e,r,s,r),new Response(JSON.stringify({queued:!0,offline:!0}),{status:202,headers:{"Content-Type":"application/json"}});try{const m={};s&&(m["Content-Type"]="application/json");const x=Uk();x&&e!=="GET"&&(m["x-csrf-token"]=x);const v=await fetch(r,{method:e,headers:m,body:s?JSON.stringify(s):void 0,credentials:"include"});return await Vk(v),v}catch(m){if(!u&&e!=="GET")return await nI(e,r,s,r),new Response(JSON.stringify({queued:!0,offline:!0}),{status:202,headers:{"Content-Type":"application/json"}});throw m}}function gB(e){let r=e[0];if(e.length>1&&typeof e[1]=="object"&&e[1]!==null){const s=new URLSearchParams,u=e[1];Object.entries(u).forEach(([x,v])=>{v!=null&&s.append(x,v)});const m=s.toString();m&&(r=`${r}?${m}`)}else e.length>1&&(r=e.join("/"));return r}const $k=({on401:e})=>async({queryKey:r})=>{const s=gB(r),u=s.startsWith("http")?s:`${window.location.origin}${s}`,m=sB(u);try{const x=await fetch(s,{credentials:"include"});if(e==="returnNull"&&(x.status===401||x.status===403))return null;await Vk(x);const v=await x.json();return m&&v&&lB(r,v).catch(console.error),v}catch(x){if(!navigator.onLine&&m){const v=await aB(r);if(v!==null)return v}throw x}},Gk=new j6({defaultOptions:{queries:{queryFn:$k({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),yB=1,_B=1e6;let qb=0;function vB(){return qb=(qb+1)%Number.MAX_SAFE_INTEGER,qb.toString()}const Wb=new Map,iI=e=>{if(Wb.has(e))return;const r=setTimeout(()=>{Wb.delete(e),Pm({type:"REMOVE_TOAST",toastId:e})},_B);Wb.set(e,r)},xB=(e,r)=>{switch(r.type){case"ADD_TOAST":return{...e,toasts:[r.toast,...e.toasts].slice(0,yB)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(s=>s.id===r.toast.id?{...s,...r.toast}:s)};case"DISMISS_TOAST":{const{toastId:s}=r;
49return s?iI(s):e.toasts.forEach(u=>{iI(u.id)}),{...e,toasts:e.toasts.map(u=>u.id===s||s===void 0?{...u,open:!1}:u)}}case"REMOVE_TOAST":return r.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(s=>s.id!==r.toastId)}}},K_=[];let Y_={toasts:[]};function Pm(e){Y_=xB(Y_,e),K_.forEach(r=>{r(Y_)})}function bB({...e}){const r=vB(),s=m=>Pm({type:"UPDATE_TOAST",toast:{...m,id:r}}),u=()=>Pm({type:"DISMISS_TOAST",toastId:r});return Pm({type:"ADD_TOAST",toast:{...e,id:r,open:!0,onOpenChange:m=>{m||u()}}}),{id:r,dismiss:u,update:s}}function qk(){const[e,r]=R.useState(Y_);return R.useEffect(()=>(K_.push(r),()=>{const s=K_.indexOf(r);s>-1&&K_.splice(s,1)}),[e]),{...e,toast:bB,dismiss:s=>Pm({type:"DISMISS_TOAST",toastId:s})}}function xt(e,r,{checkForDefaultPrevented:s=!0}={}){return function(m){if(e==null||e(m),s===!1||!m.defaultPrevented)return r==null?void 0:r(m)}}function oI(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function nc(...e){return r=>{let s=!1;const u=e.map(m=>{const x=oI(m,r);return!s&&typeof x=="function"&&(s=!0),x});if(s)return()=>{for(let m=0;m<u.length;m++){const x=u[m];typeof x=="function"?x():oI(e[m],null)}}}}function fr(...e){return R.useCallback(nc(...e),e)}function zs(e,r=[]){let s=[];function u(x,v){const c=R.createContext(v);c.displayName=x+"Context";const A=s.length;s=[...s,v];const L=j=>{var Q;const{scope:V,children:Z,...K}=j,Y=((Q=V==null?void 0:V[e])==null?void 0:Q[A])||c,ie=R.useMemo(()=>K,Object.values(K));return M.jsx(Y.Provider,{value:ie,children:Z})};L.displayName=x+"Provider";function z(j,V){var Y;const Z=((Y=V==null?void 0:V[e])==null?void 0:Y[A])||c,K=R.useContext(Z);if(K)return K;if(v!==void 0)return v;throw new Error(`\`${j}\` must be used within \`${x}\``)}return[L,z]}const m=()=>{const x=s.map(v=>R.createContext(v));return function(c){const A=(c==null?void 0:c[e])||x;return R.useMemo(()=>({[`__scope${e}`]:{...c,[e]:A}}),[c,A])}};return m.scopeName=e,[u,wB(m,...r)]}function wB(...e){const r=e[0];if(e.length===1)return r;const s=()=>{const u=e.map(m=>({useScope:m(),scopeName:m.scopeName}));return function(x){const v=u.reduce((c,{useScope:A,scopeName:L})=>{const j=A(x)[`__scope${L}`];return{...c,...j}},{});return R.useMemo(()=>({[`__scope${r.scopeName}`]:v}),[v])}};return s.scopeName=r.scopeName,s}function op(e){const r=R.forwardRef((s,u)=>{let{children:m,...x}=s,v=null,c=!1;const A=[];sI(m)&&typeof v_=="function"&&(m=v_(m._payload)),R.Children.forEach(m,V=>{var Z;if(CB(V)){c=!0;const K=V;let Y="child"in K.props?K.props.child:K.props.children;sI(Y)&&typeof v_=="function"&&(Y=v_(Y._payload)),v=TB(K,Y),A.push((Z=v==null?void 0:v.props)==null?void 0:Z.children)}else A.push(V)}),v?v=R.cloneElement(v,void 0,A):!c&&R.Children.count(m)===1&&R.isValidElement(m)&&(v=m);const L=v?PB(v):void 0,z=fr(u,L);if(!v){if(m||m===0)throw new Error(c?RB(e):AB(e));return m}const j=EB(x,v.props??{});return v.type!==R.Fragment&&(j.ref=u?z:L),R.cloneElement(v,j)});return r.displayName=`${e}.Slot`,r}var fp=op("Slot"),Wk=Symbol.for("radix.slottable");function SB(e){const r=s=>"child"in s?s.children(s.child):s.children;return r.displayName=`${e}.Slottable`,r.__radixId=Wk,r}var TB=(e,r)=>{if("child"in e.props){const s=e.props.child;return R.isValidElement(s)?R.cloneElement(s,void 0,e.props.children(s.props.children)):null}return R.isValidElement(r)?r:null};function EB(e,r){const s={...r};for(const u in r){const m=e[u],x=r[u];/^on[A-Z]/.test(u)?m&&x?s[u]=(...c)=>{const A=x(...c);return m(...c),A}:m&&(s[u]=m):u==="style"?s[u]={...m,...x}:u==="className"&&(s[u]=[m,x].filter(Boolean).join(" "))}return{...e,...s}}function PB(e){var u,m;let r=(u=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:u.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=(m=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:m.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function CB(e){return R.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Wk}var IB=Symbol.for("react.lazy");function sI(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===IB&&"_payload"in e&&MB(e._payload)}function MB(e){return typeof e=="object"&&e!==null&&"then"in e}var AB=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,RB=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,v_=Hv[" use ".trim().toString()];
vendor: 4,490 bytes, line 49
49function fS(e){const r=e+"CollectionProvider",[s,u]=zs(r),[m,x]=s(r,{collectionRef:{current:null},itemMap:new Map}),v=Y=>{const{scope:ie,children:Q}=Y,G=R.useRef(null),J=R.useRef(new Map).current;return M.jsx(m,{scope:ie,itemMap:J,collectionRef:G,children:Q})};v.displayName=r;const c=e+"CollectionSlot",A=op(c),L=R.forwardRef((Y,ie)=>{const{scope:Q,children:G}=Y,J=x(c,Q),ue=fr(ie,J.collectionRef);return M.jsx(A,{ref:ue,children:G})});L.displayName=c;const z=e+"CollectionItemSlot",j="data-radix-collection-item",V=op(z),Z=R.forwardRef((Y,ie)=>{const{scope:Q,children:G,...J}=Y,ue=R.useRef(null),ce=fr(ie,ue),xe=x(z,Q);return R.useEffect(()=>(xe.itemMap.set(ue,{ref:ue,...J}),()=>void xe.itemMap.delete(ue))),M.jsx(V,{[j]:"",ref:ce,children:G})});Z.displayName=z;function K(Y){const ie=x(e+"CollectionConsumer",Y);return R.useCallback(()=>{const G=ie.collectionRef.current;if(!G)return[];const J=Array.from(G.querySelectorAll(`[${j}]`));return Array.from(ie.itemMap.values()).sort((xe,Re)=>J.indexOf(xe.ref.current)-J.indexOf(Re.ref.current))},[ie.collectionRef,ie.itemMap])}return[{Provider:v,Slot:L,ItemSlot:Z},K,u]}var kB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kt=kB.reduce((e,r)=>{const s=op(`Primitive.${r}`),u=R.forwardRef((m,x)=>{const{asChild:v,...c}=m,A=v?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),M.jsx(A,{...c,ref:x})});return u.displayName=`Primitive.${r}`,{...e,[r]:u}},{});function mS(e,r){e&&lg.flushSync(()=>e.dispatchEvent(r))}function Kr(e){const r=R.useRef(e);return R.useEffect(()=>{r.current=e}),R.useMemo(()=>(...s)=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)},[])}function DB(e,r=globalThis==null?void 0:globalThis.document){const s=Kr(e);R.useEffect(()=>{const u=m=>{m.key==="Escape"&&s(m)};return r.addEventListener("keydown",u,{capture:!0}),()=>r.removeEventListener("keydown",u,{capture:!0})},[s,r])}var LB="DismissableLayer",Vw="dismissableLayer.update",zB="dismissableLayer.pointerDownOutside",OB="dismissableLayer.focusOutside",aI,gS=R.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),cg=R.forwardRef((e,r)=>{const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:u=!1,onEscapeKeyDown:m,onPointerDownOutside:x,onFocusOutside:v,onInteractOutside:c,onDismiss:A,...L}=e,z=R.useContext(gS),[j,V]=R.useState(null),Z=(j==null?void 0:j.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,K]=R.useState({}),Y=fr(r,re=>V(re)),ie=Array.from(z.layers),[Q]=[...z.layersWithOutsidePointerEventsDisabled].slice(-1),G=ie.indexOf(Q),J=j?ie.indexOf(j):-1,ue=z.layersWithOutsidePointerEventsDisabled.size>0,ce=J>=G,xe=R.useRef(!1),Re=NB(re=>{const se=re.target;if(!(se instanceof Node))return;const ve=[...z.branches].some(Me=>Me.contains(se));!ce||ve||(x==null||x(re),c==null||c(re),re.defaultPrevented||A==null||A())},{ownerDocument:Z,deferPointerDownOutside:u,isDeferredPointerDownOutsideRef:xe,dismissableSurfaces:z.dismissableSurfaces}),Ce=BB(re=>{if(u&&xe.current)return;const se=re.target;[...z.branches].some(Me=>Me.contains(se))||(v==null||v(re),c==null||c(re),re.defaultPrevented||A==null||A())},Z);return DB(re=>{J===z.layers.size-1&&(m==null||m(re),!re.defaultPrevented&&A&&(re.preventDefault(),A()))},Z),R.useEffect(()=>{if(j)return s&&(z.layersWithOutsidePointerEventsDisabled.size===0&&(aI=Z.body.style.pointerEvents,Z.body.style.pointerEvents="none"),z.layersWithOutsidePointerEventsDisabled.add(j)),z.layers.add(j),lI(),()=>{s&&(z.layersWithOutsidePointerEventsDisabled.delete(j),z.layersWithOutsidePointerEventsDisabled.size===0&&(Z.body.style.pointerEvents=aI))}},[j,Z,s,z]),R.useEffect(()=>()=>{j&&(z.layers.delete(j),z.layersWithOutsidePointerEventsDisabled.delete(j),lI())},[j,z]),R.useEffect(()=>{const re=()=>K({});return document.addEventListener(Vw,re),()=>document.removeEventListener(Vw,re)},[]),M.jsx(kt.div,{...L,ref:Y,style:{pointerEvents:ue?ce?"auto":"none":void 0,...e.style},onFocusCapture:xt(e.onFocusCapture,Ce.onFocusCapture),onBlurCapture:xt(e.onBlurCapture,Ce.onBlurCapture),onPointerDownCapture:xt(e.onPointerDownCapture,Re.onPointerDownCapture)})});cg.displayName=LB;var FB="DismissableLayerBranch",Zk=R.forwardRef((e,r)=>{const s=R.useContext(gS),u=R.useRef(null),m=fr(r,u);return R.useEffect(()=>{const x=u.current;if(x)return s.branches.add(x),()=>{s.branches.delete(x)}},[s.branches]),M.jsx(kt.div,{...e,ref:m})});Zk.displayName=FB;
49function jB(){const e=R.useContext(gS),[r,s]=R.useState(null);return R.useEffect(()=>{if(r)return e.dismissableSurfaces.add(r),()=>{e.dismissableSurfaces.delete(r)}},[r,e.dismissableSurfaces]),s}function NB(e,r){const{ownerDocument:s=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:u=!1,isDeferredPointerDownOutsideRef:m,dismissableSurfaces:x}=r,v=Kr(e),c=R.useRef(!1),A=R.useRef(!1),L=R.useRef(new Map),z=R.useRef(()=>{});return R.useEffect(()=>{function j(){A.current=!1,m.current=!1,L.current.clear()}function V(){return Array.from(L.current.values()).some(Boolean)}function Z(G){if(!A.current)return;const J=G.target;J instanceof Node&&[...x].some(ce=>ce.contains(J))||L.current.set(G.type,!0),G.type==="click"&&window.setTimeout(()=>{A.current&&z.current()},0)}function K(G){A.current&&L.current.set(G.type,!1)}const Y=G=>{if(G.target&&!c.current){let J=function(){s.removeEventListener("click",z.current);const ce=V();j(),ce||Hk(zB,v,ue,{discrete:!0})};const ue={originalEvent:G};A.current=!0,m.current=u&&G.button===0,L.current.clear(),!u||G.button!==0?J():(s.removeEventListener("click",z.current),z.current=J,s.addEventListener("click",z.current,{once:!0}))}else s.removeEventListener("click",z.current),j();c.current=!1},ie=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const G of ie)s.addEventListener(G,Z,!0),s.addEventListener(G,K);const Q=window.setTimeout(()=>{s.addEventListener("pointerdown",Y)},0);return()=>{window.clearTimeout(Q),s.removeEventListener("pointerdown",Y),s.removeEventListener("click",z.current);for(const G of ie)s.removeEventListener(G,Z,!0),s.removeEventListener(G,K)}},[s,v,u,m,x]),{onPointerDownCapture:()=>c.current=!0}}function BB(e,r=globalThis==null?void 0:globalThis.document){const s=Kr(e),u=R.useRef(!1);return R.useEffect(()=>{const m=x=>{x.target&&!u.current&&Hk(OB,s,{originalEvent:x},{discrete:!1})};return r.addEventListener("focusin",m),()=>r.removeEventListener("focusin",m)},[r,s]),{onFocusCapture:()=>u.current=!0,onBlurCapture:()=>u.current=!1}}function lI(){const e=new CustomEvent(Vw);document.dispatchEvent(e)}function Hk(e,r,s,{discrete:u}){const m=s.originalEvent.target,x=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});r&&m.addEventListener(e,r,{once:!0}),u?mS(m,x):m.dispatchEvent(x)}var VB=cg,UB=Zk,to=globalThis!=null&&globalThis.document?R.useLayoutEffect:()=>{},$B="Portal",d0=R.forwardRef((e,r)=>{var c;const{container:s,...u}=e,[m,x]=R.useState(!1);to(()=>x(!0),[]);const v=s||m&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return v?lg.createPortal(M.jsx(kt.div,{...u,ref:r}),v):null});d0.displayName=$B;function GB(e,r){return R.useReducer((s,u)=>r[s][u]??s,e)}var Fi=e=>{const{present:r,children:s}=e,u=qB(r),m=typeof s=="function"?s({present:u.isPresent}):R.Children.only(s),x=WB(u.ref,ZB(m));return typeof s=="function"||u.isPresent?R.cloneElement(m,{ref:x}):null};Fi.displayName="Presence";function qB(e){const[r,s]=R.useState(),u=R.useRef(null),m=R.useRef(e),x=R.useRef("none"),v=e?"mounted":"unmounted",[c,A]=GB(v,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R.useEffect(()=>{const L=x_(u.current);x.current=c==="mounted"?L:"none"},[c]),to(()=>{const L=u.current,z=m.current;if(z!==e){const V=x.current,Z=x_(L);e?A("MOUNT"):Z==="none"||(L==null?void 0:L.display)==="none"?A("UNMOUNT"):A(z&&V!==Z?"ANIMATION_OUT":"UNMOUNT"),m.current=e}},[e,A]),to(()=>{if(r){let L;const z=r.ownerDocument.defaultView??window,j=Z=>{const Y=x_(u.current).includes(CSS.escape(Z.animationName));if(Z.target===r&&Y&&(A("ANIMATION_END"),!m.current)){const ie=r.style.animationFillMode;r.style.animationFillMode="forwards",L=z.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=ie)})}},V=Z=>{Z.target===r&&(x.current=x_(u.current))};return r.addEventListener("animationstart",V),r.addEventListener("animationcancel",j),r.addEventListener("animationend",j),()=>{z.clearTimeout(L),r.removeEventListener("animationstart",V),r.removeEventListener("animationcancel",j),r.removeEventListener("animationend",j)}}else A("ANIMATION_END")},[r,A]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:R.useCallback(L=>{u.current=L?getComputedStyle(L):null,s(L)},[])}}function cI(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function WB(...e){const r=R.useRef(e);return r.current=e,R.useCallback(s=>{const u=r.current;let m=!1;const x=u.map(v=>{const c=cI(v,s);return!m&&typeof c=="function"&&(m=!0),c});if(m)return()=>{for(let v=0;v<x.length;v++){const c=x[v];typeof c=="function"?c():cI(u[v],null)}}},[])}function x_(e){return(e==null?void 0:e.animationName)||"none"}function ZB(e){var u,m;let r=(u=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:u.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=(m=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:m.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var HB=Hv[" useInsertionEffect ".trim().toString()]||to;function ug({prop:e,defaultProp:r,onChange:s=()=>{},caller:u}){const[m,x,v]=XB({defaultProp:r,onChange:s}),c=e!==void 0,A=c?e:m;{const z=R.useRef(e!==void 0);R.useEffect(()=>{const j=z.current;j!==c&&console.warn(`${u} is changing from ${j?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),z.current=c},[c,u])}const L=R.useCallback(z=>{var j;if(c){const V=KB(z)?z(e):z;V!==e&&((j=v.current)==null||j.call(v,V))}else x(z)},[c,e,x,v]);return[A,L]}function XB({defaultProp:e,onChange:r}){const[s,u]=R.useState(e),m=R.useRef(s),x=R.useRef(r);return HB(()=>{x.current=r},[r]),R.useEffect(()=>{var v;m.current!==s&&((v=x.current)==null||v.call(x,s),m.current=s)},[s,m]),[s,u,x]}function KB(e){return typeof e=="function"}var YB=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),QB="VisuallyHidden",h0=R.forwardRef((e,r)=>M.jsx(kt.span,{...e,ref:r,style:{...YB,...e.style}}));h0.displayName=QB;var JB=h0,yS="ToastProvider",[_S,e8,t8]=fS("Toast"),[Xk]=zs("Toast",[t8]),[r8,p0]=Xk(yS),Kk=e=>{const{__scopeToast:r,label:s="Notification",duration:u=5e3,swipeDirection:m="right",swipeThreshold:x=50,announcerContainer:v,children:c}
49=e,[A,L]=R.useState(null),[z,j]=R.useState(0),V=R.useRef(!1),Z=R.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${yS}\`. Expected non-empty \`string\`.`),M.jsx(_S.Provider,{scope:r,children:M.jsx(r8,{scope:r,label:s,duration:u,swipeDirection:m,swipeThreshold:x,toastCount:z,viewport:A,onViewportChange:L,onToastAdd:R.useCallback(()=>j(K=>K+1),[]),onToastRemove:R.useCallback(()=>j(K=>K-1),[]),isFocusedToastEscapeKeyDownRef:V,isClosePausedRef:Z,announcerContainer:v,children:c})})};Kk.displayName=yS;var Yk="ToastViewport",n8=["F8"],Uw="toast.viewportPause",$w="toast.viewportResume",Qk=R.forwardRef((e,r)=>{const{__scopeToast:s,hotkey:u=n8,label:m="Notifications ({hotkey})",...x}=e,v=p0(Yk,s),c=e8(s),A=R.useRef(null),L=R.useRef(null),z=R.useRef(null),j=R.useRef(null),V=fr(r,j,v.onViewportChange),Z=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=v.toastCount>0;R.useEffect(()=>{const ie=Q=>{var J;u.length!==0&&u.every(ue=>Q[ue]||Q.code===ue)&&((J=j.current)==null||J.focus())};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[u]),R.useEffect(()=>{const ie=A.current,Q=j.current;if(K&&ie&&Q){const G=()=>{if(!v.isClosePausedRef.current){const xe=new CustomEvent(Uw);Q.dispatchEvent(xe),v.isClosePausedRef.current=!0}},J=()=>{if(v.isClosePausedRef.current){const xe=new CustomEvent($w);Q.dispatchEvent(xe),v.isClosePausedRef.current=!1}},ue=xe=>{!ie.contains(xe.relatedTarget)&&J()},ce=()=>{ie.contains(document.activeElement)||J()};return ie.addEventListener("focusin",G),ie.addEventListener("focusout",ue),ie.addEventListener("pointermove",G),ie.addEventListener("pointerleave",ce),window.addEventListener("blur",G),window.addEventListener("focus",J),()=>{ie.removeEventListener("focusin",G),ie.removeEventListener("focusout",ue),ie.removeEventListener("pointermove",G),ie.removeEventListener("pointerleave",ce),window.removeEventListener("blur",G),window.removeEventListener("focus",J)}}},[K,v.isClosePausedRef]);const Y=R.useCallback(({tabbingDirection:ie})=>{const G=c().map(J=>{const ue=J.ref.current,ce=[ue,...g8(ue)];return ie==="forwards"?ce:ce.reverse()});return(ie==="forwards"?G.reverse():G).flat()},[c]);return R.useEffect(()=>{const ie=j.current;if(ie){const Q=G=>{var ce,xe,Re;const J=G.altKey||G.ctrlKey||G.metaKey;if(G.key==="Tab"&&!J){const Ce=document.activeElement,re=G.shiftKey;if(G.target===ie&&re){(ce=L.current)==null||ce.focus();return}const Me=Y({tabbingDirection:re?"backwards":"forwards"}),qe=Me.findIndex($e=>$e===Ce);Zb(Me.slice(qe+1))?G.preventDefault():re?(xe=L.current)==null||xe.focus():(Re=z.current)==null||Re.focus()}};return ie.addEventListener("keydown",Q),()=>ie.removeEventListener("keydown",Q)}},[c,Y]),M.jsxs(UB,{ref:A,role:"region","aria-label":m.replace("{hotkey}",Z),tabIndex:-1,style:{pointerEvents:K?void 0:"none"},children:[K&&M.jsx(Gw,{ref:L,onFocusFromOutsideViewport:()=>{const ie=Y({tabbingDirection:"forwards"});Zb(ie)}}),M.jsx(_S.Slot,{scope:s,children:M.jsx(kt.ol,{tabIndex:-1,...x,ref:V})}),K&&M.jsx(Gw,{ref:z,onFocusFromOutsideViewport:()=>{const ie=Y({tabbingDirection:"backwards"});Zb(ie)}})]})});Qk.displayName=Yk;var Jk="ToastFocusProxy",Gw=R.forwardRef((e,r)=>{const{__scopeToast:s,onFocusFromOutsideViewport:u,...m}=e,x=p0(Jk,s);return M.jsx(h0,{tabIndex:0,...m,ref:r,style:{position:"fixed"},onFocus:v=>{var L;const c=v.relatedTarget;!((L=x.viewport)!=null&&L.contains(c))&&u()}})});Gw.displayName=Jk;var dg="Toast",i8="toast.swipeStart",o8="toast.swipeMove",s8="toast.swipeCancel",a8="toast.swipeEnd",eD=R.forwardRef((e,r)=>{const{forceMount:s,open:u,defaultOpen:m,onOpenChange:x,...v}=e,[c,A]=ug({prop:u,defaultProp:m??!0,onChange:x,caller:dg});return M.jsx(Fi,{present:s||c,children:M.jsx(u8,{open:c,...v,ref:r,onClose:()=>A(!1),onPause:Kr(e.onPause),onResume:Kr(e.onResume),onSwipeStart:xt(e.onSwipeStart,L=>{L.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:xt(e.onSwipeMove,L=>{const{x:z,y:j}=L.detail.delta;L.currentTarget.setAttribute("data-swipe","move"),L.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${z}px`),L.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${j}px`)}
49),onSwipeCancel:xt(e.onSwipeCancel,L=>{L.currentTarget.setAttribute("data-swipe","cancel"),L.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),L.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),L.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),L.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:xt(e.onSwipeEnd,L=>{const{x:z,y:j}=L.detail.delta;L.currentTarget.setAttribute("data-swipe","end"),L.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),L.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),L.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${z}px`),L.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${j}px`),A(!1)})})})});eD.displayName=dg;var[l8,c8]=Xk(dg,{onClose(){}}),u8=R.forwardRef((e,r)=>{const{__scopeToast:s,type:u="foreground",duration:m,open:x,onClose:v,onEscapeKeyDown:c,onPause:A,onResume:L,onSwipeStart:z,onSwipeMove:j,onSwipeCancel:V,onSwipeEnd:Z,...K}=e,Y=p0(dg,s),[ie,Q]=R.useState(null),G=fr(r,$e=>Q($e)),J=R.useRef(null),ue=R.useRef(null),ce=m||Y.duration,xe=R.useRef(0),Re=R.useRef(ce),Ce=R.useRef(0),{onToastAdd:re,onToastRemove:se}=Y,ve=Kr(()=>{var De;(ie==null?void 0:ie.contains(document.activeElement))&&((De=Y.viewport)==null||De.focus()),v()}),Me=R.useCallback($e=>{!$e||$e===1/0||(window.clearTimeout(Ce.current),xe.current=new Date().getTime(),Ce.current=window.setTimeout(ve,$e))},[ve]);R.useEffect(()=>{const $e=Y.viewport;if($e){const De=()=>{Me(Re.current),L==null||L()},Ze=()=>{const We=new Date().getTime()-xe.current;Re.current=Re.current-We,window.clearTimeout(Ce.current),A==null||A()};return $e.addEventListener(Uw,Ze),$e.addEventListener($w,De),()=>{$e.removeEventListener(Uw,Ze),$e.removeEventListener($w,De)}}},[Y.viewport,ce,A,L,Me]),R.useEffect(()=>{x&&!Y.isClosePausedRef.current&&Me(ce)},[x,ce,Y.isClosePausedRef,Me]),R.useEffect(()=>(re(),()=>se()),[re,se]);const qe=R.useMemo(()=>ie?aD(ie):null,[ie]);return Y.viewport?M.jsxs(M.Fragment,{children:[qe&&M.jsx(d8,{__scopeToast:s,role:"status","aria-live":u==="foreground"?"assertive":"polite",children:qe}),M.jsx(l8,{scope:s,onClose:ve,children:lg.createPortal(M.jsx(_S.ItemSlot,{scope:s,children:M.jsx(VB,{asChild:!0,onEscapeKeyDown:xt(c,()=>{Y.isFocusedToastEscapeKeyDownRef.current||ve(),Y.isFocusedToastEscapeKeyDownRef.current=!1}),children:M.jsx(kt.li,{tabIndex:0,"data-state":x?"open":"closed","data-swipe-direction":Y.swipeDirection,...K,ref:G,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:xt(e.onKeyDown,$e=>{$e.key==="Escape"&&(c==null||c($e.nativeEvent),$e.nativeEvent.defaultPrevented||(Y.isFocusedToastEscapeKeyDownRef.current=!0,ve()))}),onPointerDown:xt(e.onPointerDown,$e=>{$e.button===0&&(J.current={x:$e.clientX,y:$e.clientY})}),onPointerMove:xt(e.onPointerMove,$e=>{if(!J.current)return;const De=$e.clientX-J.current.x,Ze=$e.clientY-J.current.y,We=!!ue.current,Ae=["left","right"].includes(Y.swipeDirection),Pe=["left","up"].includes(Y.swipeDirection)?Math.min:Math.max,Ke=Ae?Pe(0,De):0,ot=Ae?0:Pe(0,Ze),ze=$e.pointerType==="touch"?10:2,Je={x:Ke,y:ot},mt={originalEvent:$e,delta:Je};We?(ue.current=Je,b_(o8,j,mt,{discrete:!1})):uI(Je,Y.swipeDirection,ze)?(ue.current=Je,b_(i8,z,mt,{discrete:!1}),$e.target.setPointerCapture($e.pointerId)):(Math.abs(De)>ze||Math.abs(Ze)>ze)&&(J.current=null)}),onPointerUp:xt(e.onPointerUp,$e=>{const De=ue.current,Ze=$e.target;if(Ze.hasPointerCapture($e.pointerId)&&Ze.releasePointerCapture($e.pointerId),ue.current=null,J.current=null,De){const We=$e.currentTarget,Ae={originalEvent:$e,delta:De};uI(De,Y.swipeDirection,Y.swipeThreshold)?b_(a8,Z,Ae,{discrete:!0}):b_(s8,V,Ae,{discrete:!0}),We.addEventListener("click",Pe=>Pe.preventDefault(),{once:!0})}})})})}),Y.viewport)})]}):null}),d8=e=>{const{__scopeToast:r,children:s,...u}=e,m=p0(dg,r),[x,v]=R.useState(!1),[c,A]=R.useState(!1);return f8(()=>v(!0)),R.useEffect(()=>{const L=window.setTimeout(()=>A(!0),1e3);return()=>window.clearTimeout(L)},[]),c?null:M.jsx(d0,{asChild:!0,container:m.announcerContainer||void 0,children:M.jsx(h0,{...u,children:x&&M.jsxs(M.Fragment,{children:[m.label," ",s]})})})},h8="ToastTitle",tD=R.forwardRef((e,r)=>{const{__scopeToast:s,...u}=e;return M.jsx(kt.div,{...u,ref:r})});tD.displayName=h8;var p8="ToastDescription",rD=R.forwardRef((e,r)=>{const{__scopeToast:s,...u}=e;return M.jsx(kt.div,{...u,ref:r})});rD.displayName=p8;var nD="ToastAction",iD=R.forwardRef((e,r)=>{const{altText:s,...u}=e;return s.trim()?M.jsx(sD,{altText:s,asChild:!0,children:M.jsx(vS,{...u,ref:r})}):(console.error(`Invalid prop \`altText\` supplied to \`${nD}\`. Expected non-empty \`string\`.`),null)});iD.displayName=nD;var oD="ToastClose",vS=R.forwardRef((e,r)=>{const{__scopeToast:s,...u}=e,m=c8(oD,s);return M.jsx(sD,{asChild:!0,children:M.jsx(kt.button,{type:"button",...u,ref:r,onClick:xt(e.onClick,m.onClose)})})});vS.displayName=oD;var sD=R.forwardRef((e,r)=>{const{__scopeToast:s,altText:u,...m}=e;return M.jsx(kt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":u||void 0,...m,ref:r})});function aD(e){const r=[];
49return Array.from(e.childNodes).forEach(u=>{if(u.nodeType===u.TEXT_NODE&&u.textContent&&r.push(u.textContent),m8(u)){const m=u.ariaHidden||u.hidden||u.style.display==="none",x=u.dataset.radixToastAnnounceExclude==="";if(!m)if(x){const v=u.dataset.radixToastAnnounceAlt;v&&r.push(v)}else r.push(...aD(u))}}),r}function b_(e,r,s,{discrete:u}){const m=s.originalEvent.currentTarget,x=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:s});r&&m.addEventListener(e,r,{once:!0}),u?mS(m,x):m.dispatchEvent(x)}var uI=(e,r,s=0)=>{const u=Math.abs(e.x),m=Math.abs(e.y),x=u>m;return r==="left"||r==="right"?x&&u>s:!x&&m>s};function f8(e=()=>{}){const r=Kr(e);to(()=>{let s=0,u=0;return s=window.requestAnimationFrame(()=>u=window.requestAnimationFrame(r)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(u)}},[r])}function m8(e){return e.nodeType===e.ELEMENT_NODE}function g8(e){const r=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:u=>{const m=u.tagName==="INPUT"&&u.type==="hidden";return u.disabled||u.hidden||m?NodeFilter.FILTER_SKIP:u.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function Zb(e){const r=document.activeElement;return e.some(s=>s===r?!0:(s.focus(),document.activeElement!==r))}var y8=Kk,lD=Qk,cD=eD,uD=tD,dD=rD,hD=iD,pD=vS;function fD(e){var r,s,u="";if(typeof e=="string"||typeof e=="number")u+=e;else if(typeof e=="object")if(Array.isArray(e)){var m=e.length;for(r=0;r<m;r++)e[r]&&(s=fD(e[r]))&&(u&&(u+=" "),u+=s)}else for(s in e)e[s]&&(u&&(u+=" "),u+=s);return u}function mD(){for(var e,r,s=0,u="",m=arguments.length;s<m;s++)(e=arguments[s])&&(r=fD(e))&&(u&&(u+=" "),u+=r);return u}const dI=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hI=mD,hg=(e,r)=>s=>{var u;if((r==null?void 0:r.variants)==null)return hI(e,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:m,defaultVariants:x}=r,v=Object.keys(m).map(L=>{const z=s==null?void 0:s[L],j=x==null?void 0:x[L];if(z===null)return null;const V=dI(z)||dI(j);return m[L][V]}),c=s&&Object.entries(s).reduce((L,z)=>{let[j,V]=z;return V===void 0||(L[j]=V),L},{}),A=r==null||(u=r.compoundVariants)===null||u===void 0?void 0:u.reduce((L,z)=>{let{class:j,className:V,...Z}=z;return Object.entries(Z).every(K=>{let[Y,ie]=K;return Array.isArray(ie)?ie.includes({...x,...c}[Y]):{...x,...c}[Y]===ie})?[...L,j,V]:L},[]);return hI(e,v,A,s==null?void 0:s.class,s==null?void 0:s.className)};/**
50 * @license lucide-react v0.453.0 - ISC
51 *
52 * This source code is licensed under the ISC license.
53 * See the LICENSE file in the root directory of this source tree.
54 */const _8=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gD=(...e)=>e.filter((r,s,u)=>!!r&&u.indexOf(r)===s).join(" ");/**
55 * @license lucide-react v0.453.0 - ISC
56 *
57 * This source code is licensed under the ISC license.
58 * See the LICENSE file in the root directory of this source tree.
59 */var v8={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
60 * @license lucide-react v0.453.0 - ISC
61 *
62 * This source code is licensed under the ISC license.
63 * See the LICENSE file in the root directory of this source tree.
64 */const x8=R.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:u,className:m="",children:x,iconNode:v,...c},A)=>R.createElement("svg",{ref:A,...v8,width:r,height:r,stroke:e,strokeWidth:u?Number(s)*24/Number(r):s,className:gD("lucide",m),...c},[...v.map(([L,z])=>R.createElement(L,z)),...Array.isArray(x)?x:[x]]));/**
65 * @license lucide-react v0.453.0 - ISC
66 *
67 * This source code is licensed under the ISC license.
68 * See the LICENSE file in the root directory of this source tree.
69 */const ut=(e,r)=>{const s=R.forwardRef(({className:u,...m},x)=>R.createElement(x8,{ref:x,iconNode:r,className:gD(`lucide-${_8(e)}`,u),...m}));return s.displayName=`${e}`,s};/**
70 * @license lucide-react v0.453.0 - ISC
71 *
72 * This source code is licensed under the ISC license.
73 * See the LICENSE file in the root directory of this source tree.
74 */const b8=ut("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
74-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
75 * @license lucide-react v0.453.0 - ISC
76 *
77 * This source code is licensed under the ISC license.
78 * See the LICENSE file in the root directory of this source tree.
79 */const w8=ut("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
80 * @license lucide-react v0.453.0 - ISC
81 *
82 * This source code is licensed under the ISC license.
83 * See the LICENSE file in the root directory of this source tree.
84 */const Q_=ut("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
85 * @license lucide-react v0.453.0 - ISC
86 *
87 * This source code is licensed under the ISC license.
88 * See the LICENSE file in the root directory of this source tree.
89 */const S8=ut("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
90 * @license lucide-react v0.453.0 - ISC
91 *
92 * This source code is licensed under the ISC license.
93 * See the LICENSE file in the root directory of this source tree.
94 */const T8=ut("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
95 * @license lucide-react v0.453.0 - ISC
96 *
97 * This source code is licensed under the ISC license.
98 * See the LICENSE file in the root directory of this source tree.
99 */const E8=ut("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
100 * @license lucide-react v0.453.0 - ISC
101 *
102 * This source code is licensed under the ISC license.
103 * See the LICENSE file in the root directory of this source tree.
104 */const P8=ut("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
105 * @license lucide-react v0.453.0 - ISC
106 *
107 * This source code is licensed under the ISC license.
108 * See the LICENSE file in the root directory of this source tree.
109 */const J_=ut("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
110 * @license lucide-react v0.453.0 - ISC
111 *
112 * This source code is licensed under the ISC license.
113 * See the LICENSE file in the root directory of this source tree.
114 */const kh=ut("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
115 * @license lucide-react v0.453.0 - ISC
116 *
117 * This source code is licensed under the ISC license.
118 * See the LICENSE file in the root directory of this source tree.
119 */const C8=ut("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
120 * @license lucide-react v0.453.0 - ISC
121 *
122 * This source code is licensed under the ISC license.
123 * See the LICENSE file in the root directory of this source tree.
124 */const ln=ut("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
125 * @license lucide-react v0.453.0 - ISC
126 *
127 * This source code is licensed under the ISC license.
128 * See the LICENSE file in the root directory of this source tree.
129 */const I8=ut("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",ke
129y:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
130 * @license lucide-react v0.453.0 - ISC
131 *
132 * This source code is licensed under the ISC license.
133 * See the LICENSE file in the root directory of this source tree.
134 */const M8=ut("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/**
135 * @license lucide-react v0.453.0 - ISC
136 *
137 * This source code is licensed under the ISC license.
138 * See the LICENSE file in the root directory of this source tree.
139 */const yD=ut("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
140 * @license lucide-react v0.453.0 - ISC
141 *
142 * This source code is licensed under the ISC license.
143 * See the LICENSE file in the root directory of this source tree.
144 */const A8=ut("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
145 * @license lucide-react v0.453.0 - ISC
146 *
147 * This source code is licensed under the ISC license.
148 * See the LICENSE file in the root directory of this source tree.
149 */const R8=ut("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
150 * @license lucide-react v0.453.0 - ISC
151 *
152 * This source code is licensed under the ISC license.
153 * See the LICENSE file in the root directory of this source tree.
154 */const k8=ut("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
155 * @license lucide-react v0.453.0 - ISC
156 *
157 * This source code is licensed under the ISC license.
158 * See the LICENSE file in the root directory of this source tree.
159 */const D8=ut("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
160 * @license lucide-react v0.453.0 - ISC
161 *
162 * This source code is licensed under the ISC license.
163 * See the LICENSE file in the root directory of this source tree.
164 */const Wm=ut("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
165 * @license lucide-react v0.453.0 - ISC
166 *
167 * This source code is licensed under the ISC license.
168 * See the LICENSE file in the root directory of this source tree.
169 */const L8=ut("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
170 * @license lucide-react v0.453.0 - ISC
171 *
172 * This source code is licensed under the ISC license.
173 * See the LICENSE file in the root directory of this source tree.
174 */const fm=ut("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
175 * @license lucide-react v0.453.0 - ISC
176 *
177 * This source code is licensed under the ISC license.
178 * See the LICENSE file in the root directory of this source tree.
179 */const z8=ut("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
180 * @license lucide-react v0.453.0 - ISC
181 *
182 * This source code is licensed under the ISC license.
183 * See the LICENSE file in the root directory of this source tree.
184 */const O8=ut("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
185 * @license lucide-react v0.453.0 - ISC
186 *
187 * This source code is licensed under the ISC license.
188 * See the LICENSE file in the root directory of this source tree.
189 */const qw=ut("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
190 * @license lucide-react v0.453.0 - ISC
191 *
192 * This source code is licensed under the ISC license.
193 * See the LICENSE file in the root directory of this source tree.
194 */const F8=ut("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
195 * @license lucide-react v0.453.0 - ISC
196 *
197 * This source code is licensed under the ISC license.
198 * See the LICENSE file in the root directory of this source tree.
199 */const j8=ut("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
200 * @license lucide-react v0.453.0 - ISC
201 *
202 * This source code is licensed under the ISC license.
203 * See the LICENSE file in the root directory of this source tree.
204 */const _D=ut("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
205 * @license lucide-react v0.453.0 - ISC
206 *
207 * This source code is licensed under the ISC license.
208 * See the LICENSE file in the root directory of this source tree.
209 */const ic=ut("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
210 * @license lucide-react v0.453.0 - ISC
211 *
212 * This source code is licensed under the ISC license.
213 * See the LICENSE file in the root directory of this source tree.
214 */const N8=ut("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
215 * @license lucide-react v0.453.0 - ISC
216 *
217 * This source code is licensed under the ISC license.
218 * See the LICENSE file in the root directory of this source tree.
219 */const vD=ut("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
220 * @license lucide-react v0.453.0 - ISC
221 *
222 * This source code is licensed under the ISC license.
223 * See the LICENSE file in the root directory of this source tree.
224 */const wo=ut("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
225 * @license lucide-react v0.453.0 - ISC
226 *
227 * This source code is licensed under the ISC license.
228 * See the LICENSE file in the root directory of this source tree.
229 */const xD=ut("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
230 * @license lucide-react v0.453.0 - ISC
231 *
232 * This source code is licensed under the ISC license.
233 * See the LICENSE file in the root directory of this source tree.
234 */const B8=ut("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
235 * @license lucide-react v0.453.0 - ISC
236 *
237 * This source code is licensed under the ISC license.
238 * See the LICENSE file in the root directory of this source tree.
239 */const vn=ut("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
240 * @license lucide-react v0.453.0 - ISC
241 *
242 * This source code is licensed under the ISC license.
243 * See the LICENSE file in the root directory of this source tree.
244 */const Zm=ut("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
245 * @license lucide-react v0.453.0 - ISC
246 *
247 * This source code is licensed under the ISC license.
248 * See the LICENSE file in the root directory of this source tree.
249 */const ro=ut("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
250 * @license lucide-react v0.453.0 - ISC
251 *
252 * This source code is licensed under the ISC license.
253 * See the LICENSE file in the root directory of this source tree.
254 */const bD=ut("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
255 * @license lucide-react v0.453.0 - ISC
256 *
257 * This source code is licensed under the ISC license.
258 * See the LICENSE file in the root directory of this source tree.
259 */const V8=ut("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
260 * @license lucide-react v0.453.0 - ISC
261 *
262 * This source code is licensed under the ISC license.
263 * See the LICENSE file in the root directory of this source tree.
264 */const Ww=ut("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
265 * @license lucide-react v0.453.0 - ISC
266 *
267 * This source code is licensed under the ISC license.
268 * See the LICENSE file in the root directory of this source tree.
269 */const U8=ut("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
270 * @license lucide-react v0.453.0 - ISC
271 *
272 * This source code is licensed under the ISC license.
273 * See the LICENSE file in the root directory of this source tree.
274 */const $8=ut("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/**
275 * @license lucide-react v0.453.0 - ISC
276 *
277 * This source code is licensed under the ISC license.
278 * See the LICENSE file in the root directory of this source tree.
279 */const Ms=ut("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
280 * @license lucide-react v0.453.0 - ISC
281 *
282 * This source code is licensed under the ISC license.
283 * See the LICENSE file in the root directory of this source tree.
284 */const G8=ut("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
285 * @license lucide-react v0.453.0 - ISC
286 *
287 * This source code is licensed under the ISC license.
288 * See the LICENSE file in the root directory of this source tree.
289 */const ec=ut("Plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.
2891-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]);/**
290 * @license lucide-react v0.453.0 - ISC
291 *
292 * This source code is licensed under the ISC license.
293 * See the LICENSE file in the root directory of this source tree.
294 */const Fu=ut("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
295 * @license lucide-react v0.453.0 - ISC
296 *
297 * This source code is licensed under the ISC license.
298 * See the LICENSE file in the root directory of this source tree.
299 */const _i=ut("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
300 * @license lucide-react v0.453.0 - ISC
301 *
302 * This source code is licensed under the ISC license.
303 * See the LICENSE file in the root directory of this source tree.
304 */const pc=ut("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
305 * @license lucide-react v0.453.0 - ISC
306 *
307 * This source code is licensed under the ISC license.
308 * See the LICENSE file in the root directory of this source tree.
309 */const wD=ut("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
310 * @license lucide-react v0.453.0 - ISC
311 *
312 * This source code is licensed under the ISC license.
313 * See the LICENSE file in the root directory of this source tree.
314 */const q8=ut("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
315 * @license lucide-react v0.453.0 - ISC
316 *
317 * This source code is licensed under the ISC license.
318 * See the LICENSE file in the root directory of this source tree.
319 */const Hb=ut("ScanLine",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 12h10",key:"b7w52i"}]]);/**
320 * @license lucide-react v0.453.0 - ISC
321 *
322 * This source code is licensed under the ISC license.
323 * See the LICENSE file in the root directory of this source tree.
324 */const SD=ut("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
325 * @license lucide-react v0.453.0 - ISC
326 *
327 * This source code is licensed under the ISC license.
328 * See the LICENSE file in the root directory of this source tree.
329 */const W8=ut("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
330 * @license lucide-react v0.453.0 - ISC
331 *
332 * This source code is licensed under the ISC license.
333 * See the LICENSE file in the root directory of this source tree.
334 */const Z8=ut("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
335 * @license lucide-react v0.453.0 - ISC
336 *
337 * This source code is licensed under the ISC license.
338 * See the LICENSE file in the root directory of this source tree.
339 */const H8=ut("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
339y:"oel41y"}]]);/**
340 * @license lucide-react v0.453.0 - ISC
341 *
342 * This source code is licensed under the ISC license.
343 * See the LICENSE file in the root directory of this source tree.
344 */const Xb=ut("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
345 * @license lucide-react v0.453.0 - ISC
346 *
347 * This source code is licensed under the ISC license.
348 * See the LICENSE file in the root directory of this source tree.
349 */const pI=ut("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
350 * @license lucide-react v0.453.0 - ISC
351 *
352 * This source code is licensed under the ISC license.
353 * See the LICENSE file in the root directory of this source tree.
354 */const Kb=ut("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
355 * @license lucide-react v0.453.0 - ISC
356 *
357 * This source code is licensed under the ISC license.
358 * See the LICENSE file in the root directory of this source tree.
359 */const X8=ut("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]]);/**
360 * @license lucide-react v0.453.0 - ISC
361 *
362 * This source code is licensed under the ISC license.
363 * See the LICENSE file in the root directory of this source tree.
364 */const TD=ut("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
365 * @license lucide-react v0.453.0 - ISC
366 *
367 * This source code is licensed under the ISC license.
368 * See the LICENSE file in the root directory of this source tree.
369 */const $l=ut("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
370 * @license lucide-react v0.453.0 - ISC
371 *
372 * This source code is licensed under the ISC license.
373 * See the LICENSE file in the root directory of this source tree.
374 */const xS=ut("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/**
375 * @license lucide-react v0.453.0 - ISC
376 *
377 * This source code is licensed under the ISC license.
378 * See the LICENSE file in the root directory of this source tree.
379 */const K8=ut("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
380 * @license lucide-react v0.453.0 - ISC
381 *
382 * This source code is licensed under the ISC license.
383 * See the LICENSE file in the root directory of this source tree.
384 */const mp=ut("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
385 * @license lucide-react v0.453.0 - ISC
386 *
387 * This source code is licensed under the ISC license.
388 * See the LICENSE file in the root directory of this source tree.
389 */const Y8=ut("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
390 * @license lucide-react v0.453.0 - ISC
391 *
392 * This source code is licensed under the ISC license.
393 * See the LICENSE file in the root directory of this source tree.
394 */const f0=ut("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}
394],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
395 * @license lucide-react v0.453.0 - ISC
396 *
397 * This source code is licensed under the ISC license.
398 * See the LICENSE file in the root directory of this source tree.
399 */const ED=ut("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
400 * @license lucide-react v0.453.0 - ISC
401 *
402 * This source code is licensed under the ISC license.
403 * See the LICENSE file in the root directory of this source tree.
404 */const PD=ut("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
405 * @license lucide-react v0.453.0 - ISC
406 *
407 * This source code is licensed under the ISC license.
408 * See the LICENSE file in the root directory of this source tree.
409 */const Yo=ut("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
410 * @license lucide-react v0.453.0 - ISC
411 *
412 * This source code is licensed under the ISC license.
413 * See the LICENSE file in the root directory of this source tree.
414 */const Q8=ut("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
415 * @license lucide-react v0.453.0 - ISC
416 *
417 * This source code is licensed under the ISC license.
418 * See the LICENSE file in the root directory of this source tree.
419 */const J8=ut("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
420 * @license lucide-react v0.453.0 - ISC
421 *
422 * This source code is licensed under the ISC license.
423 * See the LICENSE file in the root directory of this source tree.
424 */const eV=ut("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
425 * @license lucide-react v0.453.0 - ISC
426 *
427 * This source code is licensed under the ISC license.
428 * See the LICENSE file in the root directory of this source tree.
429 */const tV=ut("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/**
430 * @license lucide-react v0.453.0 - ISC
431 *
432 * This source code is licensed under the ISC license.
433 * See the LICENSE file in the root directory of this source tree.
434 */const rV=ut("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/**
435 * @license lucide-react v0.453.0 - ISC
436 *
437 * This source code is licensed under the ISC license.
438 * See the LICENSE file in the root directory of this source tree.
439 */const nV=ut("Watch",[["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["polyline",{points:"12 10 12 12 13 13",key:"19dquz"}],["path",{d:"m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05",key:"18k57s"}],["path",{d:"m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05",key:"16ny36"}]]);/**
440 * @license lucide-react v0.453.0 - ISC
441 *
442 * This source code is licensed under the ISC license.
443 * See the LICENSE file in the root directory of this source tree.
444 */const iV=ut("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}
vendor: 1,318 bytes, lines 444-454
444],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
445 * @license lucide-react v0.453.0 - ISC
446 *
447 * This source code is licensed under the ISC license.
448 * See the LICENSE file in the root directory of this source tree.
449 */const pg=ut("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
450 * @license lucide-react v0.453.0 - ISC
451 *
452 * This source code is licensed under the ISC license.
453 * See the LICENSE file in the root directory of this source tree.
454 */const ev=ut("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),bS="-",oV=e=>{const r=aV(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:u}=e;return{getClassGroupId:v=>{const c=v.split(bS);return c[0]===""&&c.length!==1&&c.shift(),CD(c,r)||sV(v)},getConflictingClassGroupIds:(v,c)=>{const A=s[v]||[];return c&&u[v]?[...A,...u[v]]:A}}},CD=(e,r)=>{var v;if(e.length===0)return r.classGroupId;const s=e[0],u=r.nextPart.get(s),m=u?CD(e.slice(1),u):void 0;if(m)return m;if(r.validators.length===0)return;const x=e.join(bS);return(v=r.validators.find(({validator:c}
vendor: 5,411 bytes, line 454
454)=>c(x)))==null?void 0:v.classGroupId},fI=/^\[(.+)\]$/,sV=e=>{if(fI.test(e)){const r=fI.exec(e)[1],s=r==null?void 0:r.substring(0,r.indexOf(":"));if(s)return"arbitrary.."+s}},aV=e=>{const{theme:r,prefix:s}=e,u={nextPart:new Map,validators:[]};return cV(Object.entries(e.classGroups),s).forEach(([x,v])=>{Zw(v,u,x,r)}),u},Zw=(e,r,s,u)=>{e.forEach(m=>{if(typeof m=="string"){const x=m===""?r:mI(r,m);x.classGroupId=s;return}if(typeof m=="function"){if(lV(m)){Zw(m(u),r,s,u);return}r.validators.push({validator:m,classGroupId:s});return}Object.entries(m).forEach(([x,v])=>{Zw(v,mI(r,x),s,u)})})},mI=(e,r)=>{let s=e;return r.split(bS).forEach(u=>{s.nextPart.has(u)||s.nextPart.set(u,{nextPart:new Map,validators:[]}),s=s.nextPart.get(u)}),s},lV=e=>e.isThemeGetter,cV=(e,r)=>r?e.map(([s,u])=>{const m=u.map(x=>typeof x=="string"?r+x:typeof x=="object"?Object.fromEntries(Object.entries(x).map(([v,c])=>[r+v,c])):x);return[s,m]}):e,uV=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=new Map,u=new Map;const m=(x,v)=>{s.set(x,v),r++,r>e&&(r=0,u=s,s=new Map)};return{get(x){let v=s.get(x);if(v!==void 0)return v;if((v=u.get(x))!==void 0)return m(x,v),v},set(x,v){s.has(x)?s.set(x,v):m(x,v)}}},ID="!",dV=e=>{const{separator:r,experimentalParseClassName:s}=e,u=r.length===1,m=r[0],x=r.length,v=c=>{const A=[];let L=0,z=0,j;for(let ie=0;ie<c.length;ie++){let Q=c[ie];if(L===0){if(Q===m&&(u||c.slice(ie,ie+x)===r)){A.push(c.slice(z,ie)),z=ie+x;continue}if(Q==="/"){j=ie;continue}}Q==="["?L++:Q==="]"&&L--}const V=A.length===0?c:c.substring(z),Z=V.startsWith(ID),K=Z?V.substring(1):V,Y=j&&j>z?j-z:void 0;return{modifiers:A,hasImportantModifier:Z,baseClassName:K,maybePostfixModifierPosition:Y}};return s?c=>s({className:c,parseClassName:v}):v},hV=e=>{if(e.length<=1)return e;const r=[];let s=[];return e.forEach(u=>{u[0]==="["?(r.push(...s.sort(),u),s=[]):s.push(u)}),r.push(...s.sort()),r},pV=e=>({cache:uV(e.cacheSize),parseClassName:dV(e),...oV(e)}),fV=/\s+/,mV=(e,r)=>{const{parseClassName:s,getClassGroupId:u,getConflictingClassGroupIds:m}=r,x=[],v=e.trim().split(fV);let c="";for(let A=v.length-1;A>=0;A-=1){const L=v[A],{modifiers:z,hasImportantModifier:j,baseClassName:V,maybePostfixModifierPosition:Z}=s(L);let K=!!Z,Y=u(K?V.substring(0,Z):V);if(!Y){if(!K){c=L+(c.length>0?" "+c:c);continue}if(Y=u(V),!Y){c=L+(c.length>0?" "+c:c);continue}K=!1}const ie=hV(z).join(":"),Q=j?ie+ID:ie,G=Q+Y;if(x.includes(G))continue;x.push(G);const J=m(Y,K);for(let ue=0;ue<J.length;++ue){const ce=J[ue];x.push(Q+ce)}c=L+(c.length>0?" "+c:c)}return c};function gV(){let e=0,r,s,u="";for(;e<arguments.length;)(r=arguments[e++])&&(s=MD(r))&&(u&&(u+=" "),u+=s);return u}const MD=e=>{if(typeof e=="string")return e;let r,s="";for(let u=0;u<e.length;u++)e[u]&&(r=MD(e[u]))&&(s&&(s+=" "),s+=r);return s};function yV(e,...r){let s,u,m,x=v;function v(A){const L=r.reduce((z,j)=>j(z),e());return s=pV(L),u=s.cache.get,m=s.cache.set,x=c,c(A)}function c(A){const L=u(A);if(L)return L;const z=mV(A,s);return m(A,z),z}return function(){return x(gV.apply(null,arguments))}}const Pr=e=>{const r=s=>s[e]||[];return r.isThemeGetter=!0,r},AD=/^\[(?:([a-z-]+):)?(.+)\]$/i,_V=/^\d+\/\d+$/,vV=new Set(["px","full","screen"]),xV=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bV=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,TV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fa=e=>Dh(e)||vV.has(e)||_V.test(e),Sl=e=>gp(e,"length",kV),Dh=e=>!!e&&!Number.isNaN(Number(e)),Yb=e=>gp(e,"number",Dh),em=e=>!!e&&Number.isInteger(Number(e)),EV=e=>e.endsWith("%")&&Dh(e.slice(0,-1)),jt=e=>AD.test(e),Tl=e=>xV.test(e),PV=new Set(["length","size","percentage"]),CV=e=>gp(e,PV,RD),IV=e=>gp(e,"position",RD),MV=new Set(["image","url"]),AV=e=>gp(e,MV,LV),RV=e=>gp(e,"",DV),tm=()=>!0,gp=(e,r,s)=>{const u=AD.exec(e);return u?u[1]?typeof r=="string"?u[1]===r:r.has(u[1]):s(u[2]):!1},kV=e=>bV.test(e)&&!wV.test(e),RD=()=>!1,DV=e=>SV.test(e),LV=e=>TV.test(e),zV=()=>{const e=Pr("colors"),r=Pr("spacing"),s=Pr("blur"),u=Pr("brightness"),m=Pr("borderColor"),x=Pr("borderRadius"),v=Pr("borderSpacing"),c=Pr("borderWidth"),A=Pr("contrast"),L=Pr("grayscale"),z=Pr("hueRotate"),j=Pr("invert"),V=Pr("gap"),Z=Pr("gradientColorStops"),K=Pr("gradientColorStopPositions"),Y=Pr("inset"),ie=Pr("margin"),Q=Pr("opacity"),G=Pr("padding"),J=Pr("saturate"),ue=Pr("scale"),ce=Pr("sepia"),xe=Pr("skew"),Re=Pr("space"),Ce=Pr("translate"),re=()=>["auto","contain","none"],se=()=>["auto","hidden","clip","visible","scroll"],ve=()=>["auto",jt,r],Me=()=>[jt,r],qe=()=>["",fa,Sl],$e=()=>["auto",Dh,jt],De=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ze=()=>["solid","dashed","dotted","double","none"],We=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ae=()=>["start","end","center","between","around","evenly","stretch"],Pe=()=>["","0",jt],Ke=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ot=()=>[Dh,jt];return{cacheSize:500,separator:":",theme:{colors:[tm],spacing:[fa,Sl],blur:["none","",Tl,jt],brightness:ot(),borderColor:[e],borderRadius:["n
454one","","full",Tl,jt],borderSpacing:Me(),borderWidth:qe(),contrast:ot(),grayscale:Pe(),hueRotate:ot(),invert:Pe(),gap:Me(),gradientColorStops:[e],gradientColorStopPositions:[EV,Sl],inset:ve(),margin:ve(),opacity:ot(),padding:Me(),saturate:ot(),scale:ot(),sepia:Pe(),skew:ot(),space:Me(),translate:Me()},classGroups:{aspect:[{aspect:["auto","square","video",jt]}],container:["container"],columns:[{columns:[Tl]}],"break-after":[{"break-after":Ke()}],"break-before":[{"break-before":Ke()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...De(),jt]}],overflow:[{overflow:se()}],"overflow-x":[{"overflow-x":se()}],"overflow-y":[{"overflow-y":se()}],overscroll:[{overscroll:re()}],"overscroll-x":[{"overscroll-x":re()}],"overscroll-y":[{"overscroll-y":re()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[Y]}],"inset-x":[{"inset-x":[Y]}],"inset-y":[{"inset-y":[Y]}],start:[{start:[Y]}],end:[{end:[Y]}],top:[{top:[Y]}],right:[{right:[Y]}],bottom:[{bottom:[Y]}],left:[{left:[Y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",em,jt]}],basis:[{basis:ve()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",jt]}],grow:[{grow:Pe()}],shrink:[{shrink:Pe()}],order:[{order:["first","last","none",em,jt]}],"grid-cols":[{"grid-cols":[tm]}],"col-start-end":[{col:["auto",{span:["full",em,jt]},jt]}],"col-start":[{"col-start":$e()}],"col-end":[{"col-end":$e()}],"grid-rows":[{"grid-rows":[tm]}],"row-start-end":[{row:["auto",{span:[em,jt]},jt]}],"row-start":[{"row-start":$e()}],"row-end":[{"row-end":$e()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",jt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",jt]}],gap:[{gap:[V]}],"gap-x":[{"gap-x":[V]}],"gap-y":[{"gap-y":[V]}],"justify-content":[{justify:["normal",...Ae()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ae(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ae(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[G]}],px:[{px:[G]}],py:[{py:[G]}],ps:[{ps:[G]}],pe:[{pe:[G]}],pt:[{pt:[G]}],pr:[{pr:[G]}],pb:[{pb:[G]}],pl:[{pl:[G]}],m:[{m:[ie]}],mx:[{mx:[ie]}],my:[{my:[ie]}],ms:[{ms:[ie]}],me:[{me:[ie]}],mt:[{mt:[ie]}],mr:[{mr:[ie]}],mb:[{mb:[ie]}],ml:[{ml:[ie]}],"space-x":[{"space-x":[Re]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Re]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",jt,r]}],"min-w":[{"min-w":[jt,r,"min","max","fit"]}],"max-w":[{"max-w":[jt,r,"none","full","min","max","fit","prose",{screen:[Tl]},Tl]}],h:[{h:[jt,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[jt,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[jt,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[jt,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Tl,Sl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Yb]}],"font-family":[{font:[tm]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",jt]}],"line-clamp":[{"line-clamp":["none",Dh,Yb]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fa,jt]}],"list-image":[{"list-image":["none",jt]}],"list-style-type":[{list:["none","disc","decimal",jt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[Q]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ze(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fa,Sl]}],"underline-offset":[{"underline-offset":["auto",fa,jt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Me()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",jt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",jt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Q]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...De(),IV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",CV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},AV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[K]}
vendor: 5,215 bytes, line 454
454],"gradient-via-pos":[{via:[K]}],"gradient-to-pos":[{to:[K]}],"gradient-from":[{from:[Z]}],"gradient-via":[{via:[Z]}],"gradient-to":[{to:[Z]}],rounded:[{rounded:[x]}],"rounded-s":[{"rounded-s":[x]}],"rounded-e":[{"rounded-e":[x]}],"rounded-t":[{"rounded-t":[x]}],"rounded-r":[{"rounded-r":[x]}],"rounded-b":[{"rounded-b":[x]}],"rounded-l":[{"rounded-l":[x]}],"rounded-ss":[{"rounded-ss":[x]}],"rounded-se":[{"rounded-se":[x]}],"rounded-ee":[{"rounded-ee":[x]}],"rounded-es":[{"rounded-es":[x]}],"rounded-tl":[{"rounded-tl":[x]}],"rounded-tr":[{"rounded-tr":[x]}],"rounded-br":[{"rounded-br":[x]}],"rounded-bl":[{"rounded-bl":[x]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[Q]}],"border-style":[{border:[...Ze(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Q]}],"divide-style":[{divide:Ze()}],"border-color":[{border:[m]}],"border-color-x":[{"border-x":[m]}],"border-color-y":[{"border-y":[m]}],"border-color-s":[{"border-s":[m]}],"border-color-e":[{"border-e":[m]}],"border-color-t":[{"border-t":[m]}],"border-color-r":[{"border-r":[m]}],"border-color-b":[{"border-b":[m]}],"border-color-l":[{"border-l":[m]}],"divide-color":[{divide:[m]}],"outline-style":[{outline:["",...Ze()]}],"outline-offset":[{"outline-offset":[fa,jt]}],"outline-w":[{outline:[fa,Sl]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:qe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[Q]}],"ring-offset-w":[{"ring-offset":[fa,Sl]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Tl,RV]}],"shadow-color":[{shadow:[tm]}],opacity:[{opacity:[Q]}],"mix-blend":[{"mix-blend":[...We(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":We()}],filter:[{filter:["","none"]}],blur:[{blur:[s]}],brightness:[{brightness:[u]}],contrast:[{contrast:[A]}],"drop-shadow":[{"drop-shadow":["","none",Tl,jt]}],grayscale:[{grayscale:[L]}],"hue-rotate":[{"hue-rotate":[z]}],invert:[{invert:[j]}],saturate:[{saturate:[J]}],sepia:[{sepia:[ce]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[s]}],"backdrop-brightness":[{"backdrop-brightness":[u]}],"backdrop-contrast":[{"backdrop-contrast":[A]}],"backdrop-grayscale":[{"backdrop-grayscale":[L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z]}],"backdrop-invert":[{"backdrop-invert":[j]}],"backdrop-opacity":[{"backdrop-opacity":[Q]}],"backdrop-saturate":[{"backdrop-saturate":[J]}],"backdrop-sepia":[{"backdrop-sepia":[ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[v]}],"border-spacing-x":[{"border-spacing-x":[v]}],"border-spacing-y":[{"border-spacing-y":[v]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",jt]}],duration:[{duration:ot()}],ease:[{ease:["linear","in","out","in-out",jt]}],delay:[{delay:ot()}],animate:[{animate:["none","spin","ping","pulse","bounce",jt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[ue]}],"scale-x":[{"scale-x":[ue]}],"scale-y":[{"scale-y":[ue]}],rotate:[{rotate:[em,jt]}],"translate-x":[{"translate-x":[Ce]}],"translate-y":[{"translate-y":[Ce]}],"skew-x":[{"skew-x":[xe]}],"skew-y":[{"skew-y":[xe]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",jt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",jt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Me()}],"scroll-mx":[{"scroll-mx":Me()}],"scroll-my":[{"scroll-my":Me()}],"scroll-ms":[{"scroll-ms":Me()}],"scroll-me":[{"scroll-me":Me()}],"scroll-mt":[{"scroll-mt":Me()}],"scroll-mr":[{"scroll-mr":Me()}],"scroll-mb":[{"scroll-mb":Me()}],"scroll-ml":[{"scroll-ml":Me()}],"scroll-p":[{"scroll-p":Me()}],"scroll-px":[{"scroll-px":Me()}],"scroll-py":[{"scroll-py":Me()}],"scroll-ps":[{"scroll-ps":Me()}],"scroll-pe":[{"scroll-pe":Me()}],"scroll-pt":[{"scroll-pt":Me()}],"scroll-pr":[{"scroll-pr":Me()}],"scroll-pb":[{"scroll-pb":Me()}],"scroll-pl":[{"scroll-pl":Me()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
454],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",jt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fa,Sl,Yb]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},OV=yV(zV);function it(...e){return OV(mD(e))}function AJ(e,r){var x;const s=typeof e=="string"?new Date(e):e;if(isNaN(s.getTime()))return"";const u=s.toLocaleString(void 0,{hour:"numeric",minute:"2-digit",...r}),m=(x=new Intl.DateTimeFormat(void 0,{timeZoneName:"short"}).formatToParts(s).find(v=>v.type==="timeZoneName"))==null?void 0:x.value;return m?`${u} ${m}`:u}const FV=y8,kD=R.forwardRef(({className:e,...r},s)=>M.jsx(lD,{ref:s,className:it("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...r}));kD.displayName=lD.displayName;const jV=hg("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),DD=R.forwardRef(({className:e,variant:r,...s},u)=>M.jsx(cD,{ref:u,className:it(jV({variant:r}),e),...s}));DD.displayName=cD.displayName;const NV=R.forwardRef(({className:e,...r},s)=>M.jsx(hD,{ref:s,className:it("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...r}));NV.displayName=hD.displayName;const LD=R.forwardRef(({className:e,...r},s)=>M.jsx(pD,{ref:s,className:it("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 5,728 bytes, line 454
454/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...r,children:M.jsx(pg,{className:"h-4 w-4"})}));LD.displayName=pD.displayName;const zD=R.forwardRef(({className:e,...r},s)=>M.jsx(uD,{ref:s,className:it("text-sm font-semibold",e),...r}));zD.displayName=uD.displayName;const OD=R.forwardRef(({className:e,...r},s)=>M.jsx(dD,{ref:s,className:it("text-sm opacity-90",e),...r}));OD.displayName=dD.displayName;function BV(){const{toasts:e}=qk();return M.jsxs(FV,{children:[e.map(function({id:r,title:s,description:u,action:m,...x}){return M.jsxs(DD,{...x,children:[M.jsxs("div",{className:"grid gap-1",children:[s&&M.jsx(zD,{children:s}),u&&M.jsx(OD,{children:u})]}),m,M.jsx(LD,{})]},r)}),M.jsx(kD,{})]})}var VV=Hv[" useId ".trim().toString()]||(()=>{}),UV=0;function no(e){const[r,s]=R.useState(VV());return to(()=>{s(u=>u??String(UV++))},[e]),r?`radix-${r}`:""}const $V=["top","right","bottom","left"],oc=Math.min,Qi=Math.max,zv=Math.round,w_=Math.floor,Ds=e=>({x:e,y:e}),GV={left:"right",right:"left",bottom:"top",top:"bottom"};function Hw(e,r,s){return Qi(e,oc(r,s))}function za(e,r){return typeof e=="function"?e(r):e}function Oa(e){return e.split("-")[0]}function yp(e){return e.split("-")[1]}function wS(e){return e==="x"?"y":"x"}function SS(e){return e==="y"?"height":"width"}function As(e){const r=e[0];return r==="t"||r==="b"?"y":"x"}function TS(e){return wS(As(e))}function qV(e,r,s){s===void 0&&(s=!1);const u=yp(e),m=TS(e),x=SS(m);let v=m==="x"?u===(s?"end":"start")?"right":"left":u==="start"?"bottom":"top";return r.reference[x]>r.floating[x]&&(v=Ov(v)),[v,Ov(v)]}function WV(e){const r=Ov(e);return[Xw(e),r,Xw(r)]}function Xw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gI=["left","right"],yI=["right","left"],ZV=["top","bottom"],HV=["bottom","top"];function XV(e,r,s){switch(e){case"top":case"bottom":return s?r?yI:gI:r?gI:yI;case"left":case"right":return r?ZV:HV;default:return[]}}function KV(e,r,s,u){const m=yp(e);let x=XV(Oa(e),s==="start",u);return m&&(x=x.map(v=>v+"-"+m),r&&(x=x.concat(x.map(Xw)))),x}function Ov(e){const r=Oa(e);return GV[r]+e.slice(r.length)}function YV(e){return{top:0,right:0,bottom:0,left:0,...e}}function FD(e){return typeof e!="number"?YV(e):{top:e,right:e,bottom:e,left:e}}function Fv(e){const{x:r,y:s,width:u,height:m}=e;return{width:u,height:m,top:s,left:r,right:r+u,bottom:s+m,x:r,y:s}}function _I(e,r,s){let{reference:u,floating:m}=e;const x=As(r),v=TS(r),c=SS(v),A=Oa(r),L=x==="y",z=u.x+u.width/2-m.width/2,j=u.y+u.height/2-m.height/2,V=u[c]/2-m[c]/2;let Z;switch(A){case"top":Z={x:z,y:u.y-m.height};break;case"bottom":Z={x:z,y:u.y+u.height};break;case"right":Z={x:u.x+u.width,y:j};break;case"left":Z={x:u.x-m.width,y:j};break;default:Z={x:u.x,y:u.y}}switch(yp(r)){case"start":Z[v]-=V*(s&&L?-1:1);break;case"end":Z[v]+=V*(s&&L?-1:1);break}return Z}async function QV(e,r){var s;r===void 0&&(r={});const{x:u,y:m,platform:x,rects:v,elements:c,strategy:A}=e,{boundary:L="clippingAncestors",rootBoundary:z="viewport",elementContext:j="floating",altBoundary:V=!1,padding:Z=0}=za(r,e),K=FD(Z),ie=c[V?j==="floating"?"reference":"floating":j],Q=Fv(await x.getClippingRect({element:(s=await(x.isElement==null?void 0:x.isElement(ie)))==null||s?ie:ie.contextElement||await(x.getDocumentElement==null?void 0:x.getDocumentElement(c.floating)),boundary:L,rootBoundary:z,strategy:A})),G=j==="floating"?{x:u,y:m,width:v.floating.width,height:v.floating.height}:v.reference,J=await(x.getOffsetParent==null?void 0:x.getOffsetParent(c.floating)),ue=await(x.isElement==null?void 0:x.isElement(J))?await(x.getScale==null?void 0:x.getScale(J))||{x:1,y:1}:{x:1,y:1},ce=Fv(x.convertOffsetParentRelativeRectToViewportRelativeRect?await x.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:G,offsetParent:J,strategy:A}):G);return{top:(Q.top-ce.top+K.top)/ue.y,bottom:(ce.bottom-Q.bottom+K.bottom)/ue.y,left:(Q.left-ce.left+K.left)/ue.x,right:(ce.right-Q.right+K.right)/ue.x}}const JV=50,eU=async(e,r,s)=>{const{placement:u="bottom",strategy:m="absolute",middleware:x=[],platform:v}=s,c=v.detectOverflow?v:{...v,detectOverflow:QV},A=await(v.isRTL==null?void 0:v.isRTL(r));let L=await v.getElementRects({reference:e,floating:r,strategy:m}),{x:z,y:j}=_I(L,u,A),V=u,Z=0;const K={};for(let Y=0;Y<x.length;Y++){const ie=x[Y];if(!ie)continue;const{name:Q,fn:G}=ie,{x:J,y:ue,data:ce,reset:xe}=await G({x:z,y:j,initialPlacement:u,placement:V,strategy:m,middlewareData:K,rects:L,platform:c,elements:{reference:e,floating:r}});z=J??z,j=ue??j,K[Q]={...K[Q],...ce},xe&&Z<JV&&(Z++,typeof xe=="object"&&(xe.placement&&(V=xe.placement),xe.rects&&(L=xe.rects===!0?await v.getElementRects({reference:e,floating:r,strategy:m}):xe.rects),{x:z,y:j}=_I(L,V,A)),Y=-1)}return{x:z,y:j,placement:V,strategy:m,middlewareData:K}},tU=e=>({name:"arrow",options:e,async fn(r){const{x:s,y:u,placement:m,rects:x,platform:v,elements:c,middlewareData:A}=r,{element:L,padding:z=0}=za(e,r)||{};if(L==null)return{};const j=FD(z),V={x:s,y:u},Z=TS(m),K=SS(Z),Y=await v.getDimensions(L),ie=Z==="y",Q=ie?"top":"left",G=ie?"bottom":"right",J=ie?"clientHeight":"clientWidth",ue=x.reference[K]+x.reference[Z]-V[Z]-x.floating[K],ce=V[Z]-x.reference[Z],xe=await(v.getOffsetParent==null?void 0:v.getOffsetParent(L));let Re=xe?xe[J]:0;(!Re||!await(v.isElement==null?void 0:v.isElement(xe)))&&(Re=c.floating[J]||x.floating[K]);const Ce=ue/2-ce/2,re=Re/2-Y[K]/2-1,se=oc(j[Q],re),ve=oc(j[G],re),Me=se,qe=Re-Y[K]-ve,$e=Re/2-Y[K]/2+Ce,De
vendor: 7,496 bytes, line 454
454=Hw(Me,$e,qe),Ze=!A.arrow&&yp(m)!=null&&$e!==De&&x.reference[K]/2-($e<Me?se:ve)-Y[K]/2<0,We=Ze?$e<Me?$e-Me:$e-qe:0;return{[Z]:V[Z]+We,data:{[Z]:De,centerOffset:$e-De-We,...Ze&&{alignmentOffset:We}},reset:Ze}}}),rU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var s,u;const{placement:m,middlewareData:x,rects:v,initialPlacement:c,platform:A,elements:L}=r,{mainAxis:z=!0,crossAxis:j=!0,fallbackPlacements:V,fallbackStrategy:Z="bestFit",fallbackAxisSideDirection:K="none",flipAlignment:Y=!0,...ie}=za(e,r);if((s=x.arrow)!=null&&s.alignmentOffset)return{};const Q=Oa(m),G=As(c),J=Oa(c)===c,ue=await(A.isRTL==null?void 0:A.isRTL(L.floating)),ce=V||(J||!Y?[Ov(c)]:WV(c)),xe=K!=="none";!V&&xe&&ce.push(...KV(c,Y,K,ue));const Re=[c,...ce],Ce=await A.detectOverflow(r,ie),re=[];let se=((u=x.flip)==null?void 0:u.overflows)||[];if(z&&re.push(Ce[Q]),j){const $e=qV(m,v,ue);re.push(Ce[$e[0]],Ce[$e[1]])}if(se=[...se,{placement:m,overflows:re}],!re.every($e=>$e<=0)){var ve,Me;const $e=(((ve=x.flip)==null?void 0:ve.index)||0)+1,De=Re[$e];if(De&&(!(j==="alignment"?G!==As(De):!1)||se.every(Ae=>As(Ae.placement)===G?Ae.overflows[0]>0:!0)))return{data:{index:$e,overflows:se},reset:{placement:De}};let Ze=(Me=se.filter(We=>We.overflows[0]<=0).sort((We,Ae)=>We.overflows[1]-Ae.overflows[1])[0])==null?void 0:Me.placement;if(!Ze)switch(Z){case"bestFit":{var qe;const We=(qe=se.filter(Ae=>{if(xe){const Pe=As(Ae.placement);return Pe===G||Pe==="y"}return!0}).map(Ae=>[Ae.placement,Ae.overflows.filter(Pe=>Pe>0).reduce((Pe,Ke)=>Pe+Ke,0)]).sort((Ae,Pe)=>Ae[1]-Pe[1])[0])==null?void 0:qe[0];We&&(Ze=We);break}case"initialPlacement":Ze=c;break}if(m!==Ze)return{reset:{placement:Ze}}}return{}}}};function vI(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function xI(e){return $V.some(r=>e[r]>=0)}const nU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:s,platform:u}=r,{strategy:m="referenceHidden",...x}=za(e,r);switch(m){case"referenceHidden":{const v=await u.detectOverflow(r,{...x,elementContext:"reference"}),c=vI(v,s.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:xI(c)}}}case"escaped":{const v=await u.detectOverflow(r,{...x,altBoundary:!0}),c=vI(v,s.floating);return{data:{escapedOffsets:c,escaped:xI(c)}}}default:return{}}}}},jD=new Set(["left","top"]);async function iU(e,r){const{placement:s,platform:u,elements:m}=e,x=await(u.isRTL==null?void 0:u.isRTL(m.floating)),v=Oa(s),c=yp(s),A=As(s)==="y",L=jD.has(v)?-1:1,z=x&&A?-1:1,j=za(r,e);let{mainAxis:V,crossAxis:Z,alignmentAxis:K}=typeof j=="number"?{mainAxis:j,crossAxis:0,alignmentAxis:null}:{mainAxis:j.mainAxis||0,crossAxis:j.crossAxis||0,alignmentAxis:j.alignmentAxis};return c&&typeof K=="number"&&(Z=c==="end"?K*-1:K),A?{x:Z*z,y:V*L}:{x:V*L,y:Z*z}}const oU=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var s,u;const{x:m,y:x,placement:v,middlewareData:c}=r,A=await iU(r,e);return v===((s=c.offset)==null?void 0:s.placement)&&(u=c.arrow)!=null&&u.alignmentOffset?{}:{x:m+A.x,y:x+A.y,data:{...A,placement:v}}}}},sU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:s,y:u,placement:m,platform:x}=r,{mainAxis:v=!0,crossAxis:c=!1,limiter:A={fn:Q=>{let{x:G,y:J}=Q;return{x:G,y:J}}},...L}=za(e,r),z={x:s,y:u},j=await x.detectOverflow(r,L),V=As(Oa(m)),Z=wS(V);let K=z[Z],Y=z[V];if(v){const Q=Z==="y"?"top":"left",G=Z==="y"?"bottom":"right",J=K+j[Q],ue=K-j[G];K=Hw(J,K,ue)}if(c){const Q=V==="y"?"top":"left",G=V==="y"?"bottom":"right",J=Y+j[Q],ue=Y-j[G];Y=Hw(J,Y,ue)}const ie=A.fn({...r,[Z]:K,[V]:Y});return{...ie,data:{x:ie.x-s,y:ie.y-u,enabled:{[Z]:v,[V]:c}}}}}},aU=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:s,y:u,placement:m,rects:x,middlewareData:v}=r,{offset:c=0,mainAxis:A=!0,crossAxis:L=!0}=za(e,r),z={x:s,y:u},j=As(m),V=wS(j);let Z=z[V],K=z[j];const Y=za(c,r),ie=typeof Y=="number"?{mainAxis:Y,crossAxis:0}:{mainAxis:0,crossAxis:0,...Y};if(A){const J=V==="y"?"height":"width",ue=x.reference[V]-x.floating[J]+ie.mainAxis,ce=x.reference[V]+x.reference[J]-ie.mainAxis;Z<ue?Z=ue:Z>ce&&(Z=ce)}if(L){var Q,G;const J=V==="y"?"width":"height",ue=jD.has(Oa(m)),ce=x.reference[j]-x.floating[J]+(ue&&((Q=v.offset)==null?void 0:Q[j])||0)+(ue?0:ie.crossAxis),xe=x.reference[j]+x.reference[J]+(ue?0:((G=v.offset)==null?void 0:G[j])||0)-(ue?ie.crossAxis:0);K<ce?K=ce:K>xe&&(K=xe)}return{[V]:Z,[j]:K}}}},lU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var s,u;const{placement:m,rects:x,platform:v,elements:c}=r,{apply:A=()=>{},...L}=za(e,r),z=await v.detectOverflow(r,L),j=Oa(m),V=yp(m),Z=As(m)==="y",{width:K,height:Y}=x.floating;let ie,Q;j==="top"||j==="bottom"?(ie=j,Q=V===(await(v.isRTL==null?void 0:v.isRTL(c.floating))?"start":"end")?"left":"right"):(Q=j,ie=V==="end"?"top":"bottom");const G=Y-z.top-z.bottom,J=K-z.left-z.right,ue=oc(Y-z[ie],G),ce=oc(K-z[Q],J),xe=!r.middlewareData.shift;let Re=ue,Ce=ce;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(Ce=J),(u=r.middlewareData.shift)!=null&&u.enabled.y&&(Re=G),xe&&!V){const se=Qi(z.left,0),ve=Qi(z.right,0),Me=Qi(z.top,0),qe=Qi(z.bottom,0);Z?Ce=K-2*(se!==0||ve!==0?se+ve:Qi(z.left,z.right)):Re=Y-2*(Me!==0||qe!==0?Me+qe:Qi(z.top,z.bottom))}await A({...r,availableWidth:Ce,availableHeight:Re});const re=await v.getDimensions(c.floating);return K!==re.width||Y!==re.height?{reset:{rects:!0}}:{}}}};function m0(){return typeof window<"u"}function _p(e){return ND(e)?(e.nodeName||"").toLowerCase():"#document"}function io(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function Os(e){var r;return(r=(ND(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function ND(e){return m0()?e instanceof Node||e instanceof io(e).Node:!1}function Jo(e){return m0()?e instanceof Element||e instanceof io(e).Element:!1}function ja(e){return m0()?e instanceof HTMLElement||e instanceof io(e).HTMLElement:!1}function bI(e){return!m0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof io(e).ShadowRoot}function fg(e){const{overflow:r,overflowX:s,overflowY:u,display:m}=es(e);return/auto|scroll|overlay|hidden|clip/.test(r+u+s)&&m!=="inline"&&m!=="contents"}function cU(e){return/^(table|td|th)$/.test(_p(e))}function g0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const uU=/transform|translate|scale|rotate|perspective|filter/,dU=/paint|layout|strict|content/,ou=e=>!!e&&e!=="none";let Qb;function ES(e){const r=Jo(e)?es(e):e;return ou(r.transform)||ou(r.translate)||ou(r.scale)||ou(r.rotate)||ou(r.perspective)||!PS()&&(ou(r.backdropFilter)||ou(r.filter))||uU.test(r.willChange||"")||dU.test(r.contain||"")}function hU(e){let r=sc(e);for(;ja(r)&&!sp(r);){if(ES(r))return r;if(g0(r))return null;r=sc(r)}return null}function PS(){return Qb==null&&(Qb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qb}function sp(e){return/^(html|body|#document)$/.test(_p(e))}function es(e){return io(e).getComputedStyle(e)}function y0(e){return Jo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function sc(e){if(_p(e)==="html")return e;const r=e.assignedSlot||e.parentNode||bI(e)&&e.host||Os(e);return bI(r)?r.host:r}function BD(e){const r=sc(e);return sp(r)?e.ownerDocument?e.ownerDocument.body:e.body:ja(r)&&fg(r)?r:BD(r)}function Hm(e,r,s){var u;r===void 0&&(r=[]),s===void 0&&(s=!0);
vendor: 13,862 bytes, line 454
454const m=BD(e),x=m===((u=e.ownerDocument)==null?void 0:u.body),v=io(m);if(x){const c=Kw(v);return r.concat(v,v.visualViewport||[],fg(m)?m:[],c&&s?Hm(c):[])}else return r.concat(m,Hm(m,[],s))}function Kw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function VD(e){const r=es(e);let s=parseFloat(r.width)||0,u=parseFloat(r.height)||0;const m=ja(e),x=m?e.offsetWidth:s,v=m?e.offsetHeight:u,c=zv(s)!==x||zv(u)!==v;return c&&(s=x,u=v),{width:s,height:u,$:c}}function CS(e){return Jo(e)?e:e.contextElement}function Lh(e){const r=CS(e);if(!ja(r))return Ds(1);const s=r.getBoundingClientRect(),{width:u,height:m,$:x}=VD(r);let v=(x?zv(s.width):s.width)/u,c=(x?zv(s.height):s.height)/m;return(!v||!Number.isFinite(v))&&(v=1),(!c||!Number.isFinite(c))&&(c=1),{x:v,y:c}}const pU=Ds(0);function UD(e){const r=io(e);return!PS()||!r.visualViewport?pU:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function fU(e,r,s){return r===void 0&&(r=!1),!s||r&&s!==io(e)?!1:r}function Ru(e,r,s,u){r===void 0&&(r=!1),s===void 0&&(s=!1);const m=e.getBoundingClientRect(),x=CS(e);let v=Ds(1);r&&(u?Jo(u)&&(v=Lh(u)):v=Lh(e));const c=fU(x,s,u)?UD(x):Ds(0);let A=(m.left+c.x)/v.x,L=(m.top+c.y)/v.y,z=m.width/v.x,j=m.height/v.y;if(x){const V=io(x),Z=u&&Jo(u)?io(u):u;let K=V,Y=Kw(K);for(;Y&&u&&Z!==K;){const ie=Lh(Y),Q=Y.getBoundingClientRect(),G=es(Y),J=Q.left+(Y.clientLeft+parseFloat(G.paddingLeft))*ie.x,ue=Q.top+(Y.clientTop+parseFloat(G.paddingTop))*ie.y;A*=ie.x,L*=ie.y,z*=ie.x,j*=ie.y,A+=J,L+=ue,K=io(Y),Y=Kw(K)}}return Fv({width:z,height:j,x:A,y:L})}function _0(e,r){const s=y0(e).scrollLeft;return r?r.left+s:Ru(Os(e)).left+s}function $D(e,r){const s=e.getBoundingClientRect(),u=s.left+r.scrollLeft-_0(e,s),m=s.top+r.scrollTop;return{x:u,y:m}}function mU(e){let{elements:r,rect:s,offsetParent:u,strategy:m}=e;const x=m==="fixed",v=Os(u),c=r?g0(r.floating):!1;if(u===v||c&&x)return s;let A={scrollLeft:0,scrollTop:0},L=Ds(1);const z=Ds(0),j=ja(u);if((j||!j&&!x)&&((_p(u)!=="body"||fg(v))&&(A=y0(u)),j)){const Z=Ru(u);L=Lh(u),z.x=Z.x+u.clientLeft,z.y=Z.y+u.clientTop}const V=v&&!j&&!x?$D(v,A):Ds(0);return{width:s.width*L.x,height:s.height*L.y,x:s.x*L.x-A.scrollLeft*L.x+z.x+V.x,y:s.y*L.y-A.scrollTop*L.y+z.y+V.y}}function gU(e){return Array.from(e.getClientRects())}function yU(e){const r=Os(e),s=y0(e),u=e.ownerDocument.body,m=Qi(r.scrollWidth,r.clientWidth,u.scrollWidth,u.clientWidth),x=Qi(r.scrollHeight,r.clientHeight,u.scrollHeight,u.clientHeight);let v=-s.scrollLeft+_0(e);const c=-s.scrollTop;return es(u).direction==="rtl"&&(v+=Qi(r.clientWidth,u.clientWidth)-m),{width:m,height:x,x:v,y:c}}const wI=25;function _U(e,r){const s=io(e),u=Os(e),m=s.visualViewport;let x=u.clientWidth,v=u.clientHeight,c=0,A=0;if(m){x=m.width,v=m.height;const z=PS();(!z||z&&r==="fixed")&&(c=m.offsetLeft,A=m.offsetTop)}const L=_0(u);if(L<=0){const z=u.ownerDocument,j=z.body,V=getComputedStyle(j),Z=z.compatMode==="CSS1Compat"&&parseFloat(V.marginLeft)+parseFloat(V.marginRight)||0,K=Math.abs(u.clientWidth-j.clientWidth-Z);K<=wI&&(x-=K)}else L<=wI&&(x+=L);return{width:x,height:v,x:c,y:A}}function vU(e,r){const s=Ru(e,!0,r==="fixed"),u=s.top+e.clientTop,m=s.left+e.clientLeft,x=ja(e)?Lh(e):Ds(1),v=e.clientWidth*x.x,c=e.clientHeight*x.y,A=m*x.x,L=u*x.y;return{width:v,height:c,x:A,y:L}}function SI(e,r,s){let u;if(r==="viewport")u=_U(e,s);else if(r==="document")u=yU(Os(e));else if(Jo(r))u=vU(r,s);else{const m=UD(e);u={x:r.x-m.x,y:r.y-m.y,width:r.width,height:r.height}}return Fv(u)}function GD(e,r){const s=sc(e);return s===r||!Jo(s)||sp(s)?!1:es(s).position==="fixed"||GD(s,r)}function xU(e,r){const s=r.get(e);if(s)return s;let u=Hm(e,[],!1).filter(c=>Jo(c)&&_p(c)!=="body"),m=null;const x=es(e).position==="fixed";let v=x?sc(e):e;for(;Jo(v)&&!sp(v);){const c=es(v),A=ES(v);!A&&c.position==="fixed"&&(m=null),(x?!A&&!m:!A&&c.position==="static"&&!!m&&(m.position==="absolute"||m.position==="fixed")||fg(v)&&!A&&GD(e,v))?u=u.filter(z=>z!==v):m=c,v=sc(v)}return r.set(e,u),u}function bU(e){let{element:r,boundary:s,rootBoundary:u,strategy:m}=e;const v=[...s==="clippingAncestors"?g0(r)?[]:xU(r,this._c):[].concat(s),u],c=SI(r,v[0],m);let A=c.top,L=c.right,z=c.bottom,j=c.left;for(let V=1;V<v.length;V++){const Z=SI(r,v[V],m);A=Qi(Z.top,A),L=oc(Z.right,L),z=oc(Z.bottom,z),j=Qi(Z.left,j)}return{width:L-j,height:z-A,x:j,y:A}}function wU(e){const{width:r,height:s}=VD(e);return{width:r,height:s}}function SU(e,r,s){const u=ja(r),m=Os(r),x=s==="fixed",v=Ru(e,!0,x,r);let c={scrollLeft:0,scrollTop:0};const A=Ds(0);function L(){A.x=_0(m)}if(u||!u&&!x)if((_p(r)!=="body"||fg(m))&&(c=y0(r)),u){const Z=Ru(r,!0,x,r);A.x=Z.x+r.clientLeft,A.y=Z.y+r.clientTop}else m&&L();x&&!u&&m&&L();const z=m&&!u&&!x?$D(m,c):Ds(0),j=v.left+c.scrollLeft-A.x-z.x,V=v.top+c.scrollTop-A.y-z.y;return{x:j,y:V,width:v.width,height:v.height}}function Jb(e){return es(e).position==="static"}function TI(e,r){if(!ja(e)||es(e).position==="fixed")return null;if(r)return r(e);let s=e.offsetParent;return Os(e)===s&&(s=s.ownerDocument.body),s}function qD(e,r){const s=io(e);if(g0(e))return s;if(!ja(e)){let m=sc(e);for(;m&&!sp(m);){if(Jo(m)&&!Jb(m))return m;m=sc(m)}return s}let u=TI(e,r);for(;u&&cU(u)&&Jb(u);)u=TI(u,r);return u&&sp(u)&&Jb(u)&&!ES(u)?s:u||hU(e)||s}const TU=async function(e){const r=this.getOffsetParent||qD,s=this.getDimensions,u=await s(e.floating);return{reference:SU(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:u.width,height:u.height}}};function EU(e){return es(e).direction==="rtl"}const PU={convertOffsetParentRelativeRectToViewportRelativeRect:mU,getDocumentElement:Os,getClippingRect:bU,getOffsetParent:qD,getElementRects:TU,getClientRects:gU,getDimensions:wU,getScale:Lh,isElement:Jo,isRTL:EU};function WD(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function CU(e,r){let s=null,u;const m=Os(e);function x(){var c;clearTimeout(u),(c=s)==null||c.disconnect(),s=null}function v(c,A){c===void 0&&(c=!1),A===void 0&&(A=1),x();const L=e.getBoundingClientRect(),{left:z,top:j,width:V,height:Z}=L;if(c||r(),!V||!Z)return;const K=w_(j),Y=w_(m.clientWidth-(z+V)),ie=w_(m.clientHeight-(j+Z)),Q=w_(z),J={rootMargin:-K+"px "+-Y+"px "+-ie+"px "+-Q+"px",threshold:Qi(0,oc(1,A))||1};let ue=!0;function ce(xe){const Re=xe[0].intersectionRatio;if(Re!==A){if(!ue)return v();Re?v(!1,Re):u=setTimeout(()=>{v(!1,1e-7)},1e3)}Re===1&&!WD(L,e.getBoundingClientRect())&&v(),ue=!1}try{s=new IntersectionObserver(ce,{...J,root:m.ownerDocument})}catch{s=new IntersectionObserver(ce,J)}s.observe(e)}return v(!0),x}function IU(e,r,s,u){u===void 0&&(u={});const{ancestorScroll:m=!0,ancestorResize:x=!0,elementResize:v=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:A=!1}=u,L=CS(e),z=m||x?[...L?Hm(L):[],...r?Hm(r):[]]:[];z.forEach(Q=>{m&&Q.addEventListener("scroll",s,{passive:!0}),x&&Q.addEventListener("resize",s)});const j=L&&c?CU(L,s):null;let V=-1,Z=null;v&&(Z=new ResizeObserver(Q=>{let[G]=Q;G&&G.target===L&&Z&&r&&(Z.unobserve(r),cancelAnimationFrame(V),V=requestAnimationFrame(()=>{var J;(J=Z)==null||J.observe(r)})),s()}),L&&!A&&Z.observe(L),r&&Z.observe(r));let K,Y=A?Ru(e):null;A&&ie();function ie(){const Q=Ru(e);Y&&!WD(Y,Q)&&s(),Y=Q,K=requestAnimationFrame(ie)}return s(),()=>{var Q;z.forEach(G=>{m&&G.removeEventListener("scroll",s),x&&G.removeEventListener("resize",s)}),j==null||j(),(Q=Z)==null||Q.disconnect(),Z=null,A&&cancelAnimationFrame(K)}}const MU=oU,AU=sU,RU=rU,kU=lU,DU=nU,EI=tU,LU=aU,zU=(e,r,s)=>{const u=new Map,m={platform:PU,...s},x={...m.platform,_c:u};return eU(e,r,{...m,platform:x})};var OU=typeof document<"u",FU=function(){},tv=OU?R.useLayoutEffect:FU;function jv(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let s,u,m;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==r.length)return!1;for(u=s;u--!==0;)if(!jv(e[u],r[u]))return!1;return!0}if(m=Object.keys(e),s=m.length,s!==Object.keys(r).length)return!1;for(u=s;u--!==0;)if(!{}.hasOwnProperty.call(r,m[u]))return!1;for(u=s;u--!==0;){const x=m[u];if(!(x==="_owner"&&e.$$typeof)&&!jv(e[x],r[x]))return!1}return!0}return e!==e&&r!==r}function ZD(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PI(e,r){const s=ZD(e);return Math.round(r*s)/s}function e1(e){const r=R.useRef(e);return tv(()=>{r.current=e}),r}function jU(e){e===void 0&&(e={});const{placement:r="bottom",strategy:s="absolute",middleware:u=[],platform:m,elements:{reference:x,floating:v}={},transform:c=!0,whileElementsMounted:A,open:L}=e,[z,j]=R.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[V,Z]=R.useState(u);jv(V,u)||Z(u);const[K,Y]=R.useState(null),[ie,Q]=R.useState(null),G=R.useCallback(Ae=>{Ae!==xe.current&&(xe.current=Ae,Y(Ae))},[]),J=R.useCallback(Ae=>{Ae!==Re.current&&(Re.current=Ae,Q(Ae))},[]),ue=x||K,ce=v||ie,xe=R.useRef(null),Re=R.useRef(null),Ce=R.useRef(z),re=A!=null,se=e1(A),ve=e1(m),Me=e1(L),qe=R.useCallback(()=>{if(!xe.current||!Re.current)return;const Ae={placement:r,strategy:s,middleware:V};ve.current&&(Ae.platform=ve.current),zU(xe.current,Re.current,Ae).then(Pe=>{const Ke={...Pe,isPositioned:Me.current!==!1};$e.current&&!jv(Ce.current,Ke)&&(Ce.current=Ke,lg.flushSync(()=>{j(Ke)}))})},[V,r,s,ve,Me]);tv(()=>{L===!1&&Ce.current.isPositioned&&(Ce.current.isPositioned=!1,j(Ae=>({...Ae,isPositioned:!1})))},[L]);const $e=R.useRef(!1);tv(()=>($e.current=!0,()=>{$e.current=!1}),[]),tv(()=>{if(ue&&(xe.current=ue),ce&&(Re.current=ce),ue&&ce){if(se.current)return se.current(ue,ce,qe);qe()}},[ue,ce,qe,se,re]);const De=R.useMemo(()=>({reference:xe,floating:Re,setReference:G,setFloating:J}),[G,J]),Ze=R.useMemo(()=>({reference:ue,floating:ce}),[ue,ce]),We=R.useMemo(()=>{const Ae={position:s,left:0,top:0};if(!Ze.floating)return Ae;const Pe=PI(Ze.floating,z.x),Ke=PI(Ze.floating,z.y);return c?{...Ae,transform:"translate("+Pe+"px, "+Ke+"px)",...ZD(Ze.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:Pe,top:Ke}},[s,c,Ze.floating,z.x,z.y]);return R.useMemo(()=>({...z,update:qe,refs:De,elements:Ze,floatingStyles:We}),[z,qe,De,Ze,We])}const NU=e=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:u,padding:m}=typeof e=="function"?e(s):e;return u&&r(u)?u.current!=null?EI({element:u.current,padding:m}).fn(s):{}:u?EI({element:u,padding:m}).fn(s):{}}}},BU=(e,r)=>{const s=MU(e);return{name:s.name,fn:s.fn,options:[e,r]}},VU=(e,r)=>{const s=AU(e);return{name:s.name,fn:s.fn,options:[e,r]}},UU=(e,r)=>({fn:LU(e).fn,options:[e,r]}),$U=(e,r)=>{const s=RU(e);return{name:s.name,fn:s.fn,options:[e,r]}},GU=(e,r)=>{const s=kU(e);return{name:s.name,fn:s.fn,options:[e,r]}},qU=(e,r)=>{const s=DU(e);return{name:s.name,fn:s.fn,options:[e,r]}},WU=(e,r)=>{const s=NU(e);return{name:s.name,fn:s.fn,options:[e,r]}};var ZU="Arrow",HD=R.forwardRef((e,r)=>{const{children:s,width:u=10,height:m=5,...x}=e;return M.jsx(kt.svg,{...x,ref:r,width:u,height:m,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:M.jsx("polygon",{points:"0,0 30,0 15,10"})})});HD.displayName=ZU;var HU=HD;function XU(e){const[r,s]=R.useState(void 0);return to(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const u=new ResizeObserver(m=>{if(!Array.isArray(m)||!m.length)return;const x=m[0];let v,c;if("borderBoxSize"in x){const A=x.borderBoxSize,L=Array.isArray(A)?A[0]:A;v=L.inlineSize,c=L.blockSize}else v=e.offsetWidth,c=e.offsetHeight;s({width:v,height:c})});return u.observe(e,{box:"border-box"}),()=>u.unobserve(e)}else s(void 0)},[e]),r}var IS="Popper",[XD,v0]=zs(IS),[KU,KD]=XD(IS),YD=e=>{const{__scopePopper:r,children:s}=e,[u,m]=R.useState(null),[x,v]=R.useState(void 0);return M.jsx(KU,{scope:r,anchor:u,onAnchorChange:m,placementState:x,setPlacementState:v,children:s})};YD.displayName=IS;var QD="PopperAnchor",JD=R.forwardRef((e,r)=>{const{__scopePopper:s,virtualRef:u,...m}=e,x=KD(QD,s),v=R.useRef(null),c=x.onAnchorChange,A=R.useCallback(K=>{v.current=K,K&&c(K)},[c]),L=fr(r,A),z=R.useRef(null);R.useEffect(()=>{if(!u)return;const K=z.current;z.current=u.current,K!==z.current&&c(z.current)});const j=x.placementState&&AS(x.placementState),V=j==null?void 0:j[0],Z=j==null?void 0:j[1];return u?null:M.jsx(kt.div,{"data-radix-popper-side":V,"data-radix-popper-align":Z,...m,ref:L})});JD.displayName=QD;var MS="PopperContent",[YU,QU]=XD(MS),eL=R.forwardRef((e,r)=>{var cr,zt,xn,Bi,lo,bt;const{__scopePopper:s,side:u="bottom",sideOffset:m=0,align:x="center",alignOffset:v=0,arrowPadding:c=0,avoidCollisions:A=!0,collisionBoundary:L=[],collisionPadding:z=0,sticky:j="partial",hideWhenDetached:V=!1,updatePositionStrategy:Z="optimized",onPlaced:K,...Y}=e,ie=KD(MS,s),[Q,G]=R.useState(null),J=fr(r,mr=>G(mr)),[ue,ce]=R.useState(null),xe=XU(ue),Re=(xe==null?void 0:xe.width)??0,Ce=(xe==null?void 0:xe.height)??0,re=u+(x!=="center"?"-"+x:""),se=typeof z=="number"?z:{top:0,right:0,bottom:0,left:0,...z},ve=Array.isArray(L)?L:[L],Me=ve.length>0,qe={padding:se,boundary:ve.filter(e7),altBoundary:Me},{refs:$e,floatingStyles:De,placement:Ze,isPositioned:We,middlewareData:Ae}=jU({strategy:"fixed",placement:re,whileElementsMounted:(...mr)=>IU(...mr,{animationFrame:Z==="always"}),elements:{reference:ie.anchor},middleware:[BU({mainAxis:m+Ce,alignmentAxis:v}),A&&VU({mainAxis:!0,crossAxis:!1,limiter:j==="partial"?UU():void 0,...qe}),A&&$U({...qe}),GU({...qe,apply:({elements:mr,rects:Nr,availableWidth:Ln,availableHeight:Wr})=>{const{width:bn,height:Io}=Nr.reference,rs=mr.floating.style;rs.setProperty("--radix-popper-available-width",`${Ln}px`),rs.setProperty("--radix-popper-available-height",`${Wr}px`),rs.setProperty("--radix-popper-anchor-width",`${bn}px`),rs.setProperty("--radix-popper-anchor-height",`${Io}px`)}}),ue&&WU({element:ue,padding:c}),t7({arrowWidth:Re,arrowHeight:Ce}
454),V&&qU({strategy:"referenceHidden",...qe,boundary:Me?qe.boundary:void 0})]}),Pe=ie.setPlacementState;to(()=>(Pe(Ze),()=>{Pe(void 0)}),[Ze,Pe]);const[Ke,ot]=AS(Ze),ze=Kr(K);to(()=>{We&&(ze==null||ze())},[We,ze]);const Je=(cr=Ae.arrow)==null?void 0:cr.x,mt=(zt=Ae.arrow)==null?void 0:zt.y,ht=((xn=Ae.arrow)==null?void 0:xn.centerOffset)!==0,[Ct,Tt]=R.useState();return to(()=>{Q&&Tt(window.getComputedStyle(Q).zIndex)},[Q]),M.jsx("div",{ref:$e.setFloating,"data-radix-popper-content-wrapper":"",style:{...De,transform:We?De.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ct,"--radix-popper-transform-origin":[(Bi=Ae.transformOrigin)==null?void 0:Bi.x,(lo=Ae.transformOrigin)==null?void 0:lo.y].join(" "),...((bt=Ae.hide)==null?void 0:bt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:M.jsx(YU,{scope:s,placedSide:Ke,placedAlign:ot,onArrowChange:ce,arrowX:Je,arrowY:mt,shouldHideArrow:ht,children:M.jsx(kt.div,{"data-side":Ke,"data-align":ot,...Y,ref:J,style:{...Y.style,animation:We?void 0:"none"}})})})});eL.displayName=MS;var tL="PopperArrow",JU={top:"bottom",right:"left",bottom:"top",left:"right"},rL=R.forwardRef(function(r,s){const{__scopePopper:u,...m}=r,x=QU(tL,u),v=JU[x.placedSide];return M.jsx("span",{ref:x.onArrowChange,style:{position:"absolute",left:x.arrowX,top:x.arrowY,[v]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[x.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[x.placedSide],visibility:x.shouldHideArrow?"hidden":void 0},children:M.jsx(HU,{...m,ref:s,style:{...m.style,display:"block"}})})});rL.displayName=tL;function e7(e){return e!==null}var t7=e=>({name:"transformOrigin",options:e,fn(r){var ie,Q,G;const{placement:s,rects:u,middlewareData:m}=r,v=((ie=m.arrow)==null?void 0:ie.centerOffset)!==0,c=v?0:e.arrowWidth,A=v?0:e.arrowHeight,[L,z]=AS(s),j={start:"0%",center:"50%",end:"100%"}[z],V=(((Q=m.arrow)==null?void 0:Q.x)??0)+c/2,Z=(((G=m.arrow)==null?void 0:G.y)??0)+A/2;let K="",Y="";return L==="bottom"?(K=v?j:`${V}px`,Y=`${-A}px`):L==="top"?(K=v?j:`${V}px`,Y=`${u.floating.height+A}px`):L==="right"?(K=`${-A}px`,Y=v?j:`${Z}px`):L==="left"&&(K=`${u.floating.width+A}px`,Y=v?j:`${Z}px`),{data:{x:K,y:Y}}}});function AS(e){const[r,s="center"]=e.split("-");return[r,s]}var nL=YD,iL=JD,oL=eL,sL=rL,[x0]=zs("Tooltip",[v0]),b0=v0(),aL="TooltipProvider",r7=700,Yw="tooltip.open",[n7,RS]=x0(aL),lL=e=>{const{__scopeTooltip:r,delayDuration:s=r7,skipDelayDuration:u=300,disableHoverableContent:m=!1,children:x}=e,v=R.useRef(!0),c=R.useRef(!1),A=R.useRef(0);return R.useEffect(()=>{const L=A.current;return()=>window.clearTimeout(L)},[]),M.jsx(n7,{scope:r,isOpenDelayedRef:v,delayDuration:s,onOpen:R.useCallback(()=>{u<=0||(window.clearTimeout(A.current),v.current=!1)},[u]),onClose:R.useCallback(()=>{u<=0||(window.clearTimeout(A.current),A.current=window.setTimeout(()=>v.current=!0,u))},[u]),isPointerInTransitRef:c,onPointerInTransitChange:R.useCallback(L=>{c.current=L},[]),disableHoverableContent:m,children:x})};lL.displayName=aL;var Xm="Tooltip",[i7,w0]=x0(Xm),cL=e=>{const{__scopeTooltip:r,children:s,open:u,defaultOpen:m,onOpenChange:x,disableHoverableContent:v,delayDuration:c}=e,A=RS(Xm,e.__scopeTooltip),L=b0(r),[z,j]=R.useState(null),V=no(),Z=R.useRef(0),K=v??A.disableHoverableContent,Y=c??A.delayDuration,ie=R.useRef(!1),[Q,G]=ug({prop:u,defaultProp:m??!1,onChange:Re=>{Re?(A.onOpen(),document.dispatchEvent(new CustomEvent(Yw))):A.onClose(),x==null||x(Re)},caller:Xm}),J=R.useMemo(()=>Q?ie.current?"delayed-open":"instant-open":"closed",[Q]),ue=R.useCallback(()=>{window.clearTimeout(Z.current),Z.current=0,ie.current=!1,G(!0)},[G]),ce=R.useCallback(()=>{window.clearTimeout(Z.current),Z.current=0,G(!1)},[G]),xe=R.useCallback(()=>{window.clearTimeout(Z.current),Z.current=window.setTimeout(()=>{ie.current=!0,G(!0),Z.current=0},Y)},[Y,G]);return R.useEffect(()=>()=>{Z.current&&(window.clearTimeout(Z.current),Z.current=0)},[]),M.jsx(nL,{...L,children:M.jsx(i7,{scope:r,contentId:V,open:Q,stateAttribute:J,trigger:z,onTriggerChange:j,onTriggerEnter:R.useCallback(()=>{A.isOpenDelayedRef.current?xe():ue()},[A.isOpenDelayedRef,xe,ue]),onTriggerLeave:R.useCallback(()=>{K?ce():(window.clearTimeout(Z.current),Z.current=0)},[ce,K]),onOpen:ue,onClose:ce,disableHoverableContent:K,children:s})})};cL.displayName=Xm;var Qw="TooltipTrigger",uL=R.forwardRef((e,r)=>{const{__scopeTooltip:s,...u}=e,m=w0(Qw,s),x=RS(Qw,s),v=b0(s),c=R.useRef(null),A=fr(r,c,m.onTriggerChange),L=R.useRef(!1),z=R.useRef(!1),j=R.useCallback(()=>L.current=!1,[]);return R.useEffect(()=>()=>document.removeEventListener("pointerup",j),[j]),M.jsx(iL,{asChild:!0,...v,children:M.jsx(kt.button,{"aria-describedby":m.open?m.contentId:void 0,"data-state":m.stateAttribute,...u,ref:A,onPointerMove:xt(e.onPointerMove,V=>{V.pointerType!=="touch"&&!z.current&&!x.isPointerInTransitRef.current&&(m.onTriggerEnter(),z.current=!0)}),onPointerLeave:xt(e.onPointerLeave,()=>{m.onTriggerLeave(),z.current=!1}),onPointerDown:xt(e.onPointerDown,()=>{m.open&&m.onClose(),L.current=!0,document.addEventListener("pointerup",j,{once:!0})}),onFocus:xt(e.onFocus,()=>{L.current||m.onOpen()}),onBlur:xt(e.onBlur,m.onClose),onClick:xt(e.onClick,m.onClose)})})});uL.displayName=Qw;var o7="TooltipPortal",[RJ,s7]=x0(o7,{forceMount:void 0}),ap="TooltipContent",dL=R.forwardRef((e,r)=>{const s=s7(ap,e.__scopeTooltip),{forceMount:u=s.forceMount,side:m="top",...x}=e,v=w0(ap,e.__scopeTooltip);
vendor: 4,569 bytes, line 454
454return M.jsx(Fi,{present:u||v.open,children:v.disableHoverableContent?M.jsx(hL,{side:m,...x,ref:r}):M.jsx(a7,{side:m,...x,ref:r})})}),a7=R.forwardRef((e,r)=>{const s=w0(ap,e.__scopeTooltip),u=RS(ap,e.__scopeTooltip),m=R.useRef(null),x=fr(r,m),[v,c]=R.useState(null),{trigger:A,onClose:L}=s,z=m.current,{onPointerInTransitChange:j}=u,V=R.useCallback(()=>{c(null),j(!1)},[j]),Z=R.useCallback((K,Y)=>{const ie=K.currentTarget,Q={x:K.clientX,y:K.clientY},G=h7(Q,ie.getBoundingClientRect()),J=p7(Q,G),ue=f7(Y.getBoundingClientRect()),ce=g7([...J,...ue]);c(ce),j(!0)},[j]);return R.useEffect(()=>()=>V(),[V]),R.useEffect(()=>{if(A&&z){const K=ie=>Z(ie,z),Y=ie=>Z(ie,A);return A.addEventListener("pointerleave",K),z.addEventListener("pointerleave",Y),()=>{A.removeEventListener("pointerleave",K),z.removeEventListener("pointerleave",Y)}}},[A,z,Z,V]),R.useEffect(()=>{if(v){const K=Y=>{const ie=Y.target,Q={x:Y.clientX,y:Y.clientY},G=(A==null?void 0:A.contains(ie))||(z==null?void 0:z.contains(ie)),J=!m7(Q,v);G?V():J&&(V(),L())};return document.addEventListener("pointermove",K),()=>document.removeEventListener("pointermove",K)}},[A,z,v,L,V]),M.jsx(hL,{...e,ref:x})}),[l7,c7]=x0(Xm,{isInside:!1}),u7=SB("TooltipContent"),hL=R.forwardRef((e,r)=>{const{__scopeTooltip:s,children:u,"aria-label":m,onEscapeKeyDown:x,onPointerDownOutside:v,...c}=e,A=w0(ap,s),L=b0(s),{onClose:z}=A;return R.useEffect(()=>(document.addEventListener(Yw,z),()=>document.removeEventListener(Yw,z)),[z]),R.useEffect(()=>{if(A.trigger){const j=V=>{V.target instanceof Node&&V.target.contains(A.trigger)&&z()};return window.addEventListener("scroll",j,{capture:!0}),()=>window.removeEventListener("scroll",j,{capture:!0})}},[A.trigger,z]),M.jsx(cg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:x,onPointerDownOutside:v,onFocusOutside:j=>j.preventDefault(),onDismiss:z,children:M.jsxs(oL,{"data-state":A.stateAttribute,...L,...c,ref:r,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[M.jsx(u7,{children:u}),M.jsx(l7,{scope:s,isInside:!0,children:M.jsx(JB,{id:A.contentId,role:"tooltip",children:m||u})})]})})});dL.displayName=ap;var pL="TooltipArrow",d7=R.forwardRef((e,r)=>{const{__scopeTooltip:s,...u}=e,m=b0(s);return c7(pL,s).isInside?null:M.jsx(sL,{...m,...u,ref:r})});d7.displayName=pL;function h7(e,r){const s=Math.abs(r.top-e.y),u=Math.abs(r.bottom-e.y),m=Math.abs(r.right-e.x),x=Math.abs(r.left-e.x);switch(Math.min(s,u,m,x)){case x:return"left";case m:return"right";case s:return"top";case u:return"bottom";default:throw new Error("unreachable")}}function p7(e,r,s=5){const u=[];switch(r){case"top":u.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":u.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":u.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":u.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s});break}return u}function f7(e){const{top:r,right:s,bottom:u,left:m}=e;return[{x:m,y:r},{x:s,y:r},{x:s,y:u},{x:m,y:u}]}function m7(e,r){const{x:s,y:u}=e;let m=!1;for(let x=0,v=r.length-1;x<r.length;v=x++){const c=r[x],A=r[v],L=c.x,z=c.y,j=A.x,V=A.y;z>u!=V>u&&s<(j-L)*(u-z)/(V-z)+L&&(m=!m)}return m}function g7(e){const r=e.slice();return r.sort((s,u)=>s.x<u.x?-1:s.x>u.x?1:s.y<u.y?-1:s.y>u.y?1:0),y7(r)}function y7(e){if(e.length<=1)return e.slice();const r=[];for(let u=0;u<e.length;u++){const m=e[u];for(;r.length>=2;){const x=r[r.length-1],v=r[r.length-2];if((x.x-v.x)*(m.y-v.y)>=(x.y-v.y)*(m.x-v.x))r.pop();else break}r.push(m)}r.pop();const s=[];for(let u=e.length-1;u>=0;u--){const m=e[u];for(;s.length>=2;){const x=s[s.length-1],v=s[s.length-2];if((x.x-v.x)*(m.y-v.y)>=(x.y-v.y)*(m.x-v.x))s.pop();else break}s.push(m)}return s.pop(),r.length===1&&s.length===1&&r[0].x===s[0].x&&r[0].y===s[0].y?r:r.concat(s)}var _7=lL,v7=cL,x7=uL,fL=dL;const mL=_7,b7=v7,w7=x7,gL=R.forwardRef(({className:e,sideOffset:r=4,...s},u)=>M.jsx(fL,{ref:u,sideOffset:r,className:it("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
454de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...s}));gL.displayName=fL.displayName;const S7={theme:"system",setTheme:()=>null},T7=R.createContext(S7);function E7({children:e,defaultTheme:r="dark",storageKey:s="slant-ui-theme",...u}){const[m,x]=R.useState(()=>localStorage.getItem(s)||r);R.useEffect(()=>{const c=window.document.documentElement;if(c.classList.remove("light","dark"),m==="system"){const A=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";c.classList.add(A);return}c.classList.add(m)},[m]);const v={theme:m,setTheme:c=>{localStorage.setItem(s,c),x(c)}};return M.jsx(T7.Provider,{...u,value:v,children:e})}var yL={exports:{}};/**
455 * MapLibre GL JS
456 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt
457 */(function(e,r){(function(s,u){e.exports=u()})(d4,function(){var s={},u={};function m(v,c,A){if(u[v]=A,v==="index"){var L="var sharedModule = {}; ("+u.shared+")(sharedModule); ("+u.worker+")(sharedModule);",z={};return u.shared(z),u.index(s,z),typeof window<"u"&&s.setWorkerUrl(window.URL.createObjectURL(new Blob([L],{type:"text/javascript"}))),s}}m("shared",["exports"],function(v){function c(o,t,i,l){return new(i||(i=Promise))(function(d,p){function g(w){try{S(l.next(w))}catch(P){p(P)}}function y(w){try{S(l.throw(w))}catch(P){p(P)}}function S(w){var P;w.done?d(w.value):(P=w.value,P instanceof i?P:new i(function(T){T(P)})).then(g,y)}S((l=l.apply(o,t||[])).next())})}function A(o,t){this.x=o,this.y=t}function L(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var z,j;typeof SuppressedError=="function"&&SuppressedError,A.prototype={clone(){return new A(this.x,this.y)},add(o){return this.clone()._add(o)},sub(o){return this.clone()._sub(o)},multByPoint(o){return this.clone()._multByPoint(o)},divByPoint(o){return this.clone()._divByPoint(o)},mult(o){return this.clone()._mult(o)},div(o){return this.clone()._div(o)},rotate(o){return this.clone()._rotate(o)},rotateAround(o,t){return this.clone()._rotateAround(o,t)},matMult(o){return this.clone()._matMult(o)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(o){return this.x===o.x&&this.y===o.y},dist(o){return Math.sqrt(this.distSqr(o))},distSqr(o){const t=o.x-this.x,i=o.y-this.y;return t*t+i*i},angle(){return Math.atan2(this.y,this.x)},angleTo(o){return Math.atan2(this.y-o.y,this.x-o.x)},angleWith(o){return this.angleWithSep(o.x,o.y)},angleWithSep(o,t){return Math.atan2(this.x*t-this.y*o,this.x*o+this.y*t)},_matMult(o){const t=o[2]*this.x+o[3]*this.y;return this.x=o[0]*this.x+o[1]*this.y,this.y=t,this},_add(o){return this.x+=o.x,this.y+=o.y,this},_sub(o){return this.x-=o.x,this.y-=o.y,this},_mult(o){return this.x*=o,this.y*=o,this},_div(o){return this.x/=o,this.y/=o,this},_multByPoint(o){return this.x*=o.x,this.y*=o.y,this},_divByPoint(o){return this.x/=o.x,this.y/=o.y,this},_unit(){return this._div(this.mag()),this},_perp(){const o=this.y;return this.y=this.x,this.x=-o,this},_rotate(o){const t=Math.cos(o),i=Math.sin(o),l=i*this.x+t*this.y;return this.x=t*this.x-i*this.y,this.y=l,this},_rotateAround(o,t){const i=Math.cos(o),l=Math.sin(o),d=t.y+l*(this.x-t.x)+i*(this.y-t.y);return this.x=t.x+i*(this.x-t.x)-l*(this.y-t.y),this.y=d,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:A},A.convert=function(o){if(o instanceof A)return o;if(Array.isArray(o))return new A(+o[0],+o[1]);if(o.x!==void 0&&o.y!==void 0)return new A(+o.x,+o.y);throw new Error("Expected [x, y] or {x, y} point format")};var V=function(){if(j)return z;function o(t,i,l,d){this.cx=3*t,this.bx=3*(l-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(d-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=l,this.p2y=d}return j=1,z=o,o.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var l=t,d=0;d<8;d++){var p=this.sampleCurveX(l)-t;if(Math.abs(p)<i)return l;var g=this.sampleCurveDerivativeX(l);if(Math.abs(g)<1e-6)break;l-=p/g}var y=0,S=1;for(l=t,d=0;d<20&&(p=this.sampleCurveX(l),!(Math.abs(p-t)<i));d++)t>p?y=l:S=l,l=.5*(S-y)+y;return l}
vendor: 4,501 bytes, line 457
457,solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},z}(),Z=L(V);let K,Y;function ie(){return K!=null||(K=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),K}function Q(){if(Y==null&&(Y=!1,ie())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let l=0;l<5*5;l++){const d=4*l;t.fillStyle=`rgb(${d},${d+1},${d+2})`,t.fillRect(l%5,Math.floor(l/5),1,1)}const i=t.getImageData(0,0,5,5).data;for(let l=0;l<5*5*4;l++)if(l%4!=3&&i[l]!==l){Y=!0;break}}}return Y||!1}var G=1e-6,J=typeof Float32Array<"u"?Float32Array:Array;function ue(){var o=new J(9);return J!=Float32Array&&(o[1]=0,o[2]=0,o[3]=0,o[5]=0,o[6]=0,o[7]=0),o[0]=1,o[4]=1,o[8]=1,o}function ce(o){return o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=1,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=1,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o}function xe(){var o=new J(3);return J!=Float32Array&&(o[0]=0,o[1]=0,o[2]=0),o}function Re(o){var t=o[0],i=o[1],l=o[2];return Math.sqrt(t*t+i*i+l*l)}function Ce(o,t,i){var l=new J(3);return l[0]=o,l[1]=t,l[2]=i,l}function re(o,t,i){return o[0]=t[0]+i[0],o[1]=t[1]+i[1],o[2]=t[2]+i[2],o}function se(o,t,i){return o[0]=t[0]*i,o[1]=t[1]*i,o[2]=t[2]*i,o}function ve(o,t,i){var l=t[0],d=t[1],p=t[2],g=i[0],y=i[1],S=i[2];return o[0]=d*S-p*y,o[1]=p*g-l*S,o[2]=l*y-d*g,o}var Me,qe=Re;function $e(o,t,i){var l=t[0],d=t[1],p=t[2],g=t[3];return o[0]=i[0]*l+i[4]*d+i[8]*p+i[12]*g,o[1]=i[1]*l+i[5]*d+i[9]*p+i[13]*g,o[2]=i[2]*l+i[6]*d+i[10]*p+i[14]*g,o[3]=i[3]*l+i[7]*d+i[11]*p+i[15]*g,o}function De(){var o=new J(4);return J!=Float32Array&&(o[0]=0,o[1]=0,o[2]=0),o[3]=1,o}function Ze(o,t,i,l){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",p=Math.PI/360;t*=p,l*=p,i*=p;var g=Math.sin(t),y=Math.cos(t),S=Math.sin(i),w=Math.cos(i),P=Math.sin(l),T=Math.cos(l);switch(d){case"xyz":o[0]=g*w*T+y*S*P,o[1]=y*S*T-g*w*P,o[2]=y*w*P+g*S*T,o[3]=y*w*T-g*S*P;break;case"xzy":o[0]=g*w*T-y*S*P,o[1]=y*S*T-g*w*P,o[2]=y*w*P+g*S*T,o[3]=y*w*T+g*S*P;break;case"yxz":o[0]=g*w*T+y*S*P,o[1]=y*S*T-g*w*P,o[2]=y*w*P-g*S*T,o[3]=y*w*T+g*S*P;break;case"yzx":o[0]=g*w*T+y*S*P,o[1]=y*S*T+g*w*P,o[2]=y*w*P-g*S*T,o[3]=y*w*T-g*S*P;break;case"zxy":o[0]=g*w*T-y*S*P,o[1]=y*S*T+g*w*P,o[2]=y*w*P+g*S*T,o[3]=y*w*T-g*S*P;break;case"zyx":o[0]=g*w*T-y*S*P,o[1]=y*S*T+g*w*P,o[2]=y*w*P-g*S*T,o[3]=y*w*T+g*S*P;break;default:throw new Error("Unknown angle order "+d)}return o}function We(){var o=new J(2);return J!=Float32Array&&(o[0]=0,o[1]=0),o}function Ae(o,t){var i=new J(2);return i[0]=o,i[1]=t,i}xe(),Me=new J(4),J!=Float32Array&&(Me[0]=0,Me[1]=0,Me[2]=0,Me[3]=0),xe(),Ce(1,0,0),Ce(0,1,0),De(),De(),ue(),We();const Pe=8192;function Ke(o,t,i){return t*(Pe/(o.tileSize*Math.pow(2,i-o.tileID.overscaledZ)))}function ot(o){return o instanceof Error?o:new Error(typeof o=="string"?o:String(o))}function ze(o,t){return(o%t+t)%t}function Je(o,t,i){return o*(1-i)+t*i}function mt(o){if(o<=0)return 0;if(o>=1)return 1;const t=o*o,i=t*o;return 4*(o<.5?i:3*(o-t)+i-.75)}function ht(o,t,i,l){const d=new Z(o,t,i,l);return p=>d.solve(p)}const Ct=ht(.25,.1,.25,1);function Tt(o,t,i){return Math.min(i,Math.max(t,o))}function cr(o,t,i){const l=i-t,d=((o-t)%l+l)%l+t;return d===t?i:d}function zt(o,...t){for(const i of t)for(const l in i)o[l]=i[l];return o}let xn=1;function Bi(o,t,i){const l={};for(const d in o)l[d]=t.call(this,o[d],d,o);return l}function lo(o,t,i){const l={};for(const d in o)t.call(this,o[d],d,o)&&(l[d]=o[d]);return l}function bt(o){return Array.isArray(o)?o.map(bt):typeof o=="object"&&o?Bi(o,bt):o}const mr={};function Nr(o){mr[o]||(typeof console<"u"&&console.warn(o),mr[o]=!0)}function Ln(o,t,i){return(i.y-o.y)*(t.x-o.x)>(t.y-o.y)*(i.x-o.x)}function Wr(o){return typeof WorkerGlobalScope<"u"&&o!==void 0&&o instanceof WorkerGlobalScope}let bn=null;function Io(o){return typeof ImageBitmap<"u"&&o instanceof ImageBitmap}const rs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function bp(o,t,i,l,d){return c(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const p=new VideoFrame(o,{timestamp:0});try{const g=p==null?void 0:p.format;if(!g||!g.startsWith("BGR")&&!g.startsWith("RGB"))throw new Error(`Unrecognized format ${g}`);const y=g.startsWith("BGR"),S=new Uint8ClampedArray(l*d*4);if(yield p.copyTo(S,function(w,P,T,D,I){const N=4*Math.max(-P,0),B=(Math.max(0,T)-T)*D*4+N,q=4*D,W=Math.max(0,P),ee=Math.max(0,T);
457return{rect:{x:W,y:ee,width:Math.min(w.width,P+D)-W,height:Math.min(w.height,T+I)-ee},layout:[{offset:B,stride:q}]}}(o,t,i,l,d)),y)for(let w=0;w<S.length;w+=4){const P=S[w];S[w]=S[w+2],S[w+2]=P}return S}finally{p.close()}})}let ns,Ba;function Bu(o,t,i,l){return o.addEventListener(t,i,l),{unsubscribe:()=>{o.removeEventListener(t,i,l)}}}function is(o){return o*Math.PI/180}function js(o){return o/Math.PI*180}const wp={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Sp={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Vu="AbortError";class fc extends Error{constructor(t=Vu){super(t instanceof Error?t.message:t),this.name=Vu,t instanceof Error&&t.stack&&(this.stack=t.stack)}}function Sg(o){return o instanceof Error&&o.name===Vu}function Uu(o){if(o.aborted)throw new fc(o.reason)}const os={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function Mo(o){return os.REGISTERED_PROTOCOLS[o.substring(0,o.indexOf("://"))]}const wi="global-dispatcher";class Va extends Error{constructor(t,i,l,d){super(`AJAXError: ${i} (${t}): ${l}`),this.status=t,this.statusText=i,this.url=l,this.body=d}}const Tp=()=>{var o;return Wr(self)?(o=self.worker)===null||o===void 0?void 0:o.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Ns=function(o,t){return c(this,void 0,void 0,function*(){var i,l;if(o.url.includes("://")&&!/^https?:|^file:/.test(o.url)){const d=Mo(o.url);if(d){const p=yield d(o,t);return p.data||o.type!=="arrayBuffer"?p:zt(p,{data:new ArrayBuffer(0)})}if(Wr(self)&&(!((i=self.worker)===null||i===void 0)&&i.actor))return self.worker.actor.sendAsync({type:"GR",data:o,targetMapId:wi},t)}if(!(d=>{var p;return d.startsWith("file:")||((p=Tp())===null||p===void 0?void 0:p.startsWith("file:"))&&!/^\w+:/.test(d)})(o.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(d,p){return c(this,void 0,void 0,function*(){const g=new Request(d.url,{method:d.method||"GET",body:d.body,credentials:d.credentials,headers:d.headers,cache:d.cache,referrer:Tp(),referrerPolicy:d.referrerPolicy,signal:p.signal});let y,S;d.type!=="json"||g.headers.has("Accept")||g.headers.set("Accept","application/json");try{y=yield fetch(g)}catch(P){throw Sg(P)?P:new Va(0,ot(P).message,d.url,new Blob)}if(!y.ok){const P=yield y.blob();throw new Va(y.status,y.statusText,d.url,P)}S=d.type==="arrayBuffer"||d.type==="image"?y.arrayBuffer():d.type==="json"?y.json():y.text();const w=yield S;return Uu(p.signal),{data:w,cacheControl:y.headers.get("Cache-Control"),expires:y.headers.get("Expires"),etag:y.headers.get("ETag")}})}(o,t);if(Wr(self)&&(!((l=self.worker)===null||l===void 0)&&l.actor))return self.worker.actor.sendAsync({type:"GR",data:o,mustQueue:!0,targetMapId:wi},t)}return function(d,p){return new Promise((g,y)=>{var S;const w=new XMLHttpRequest;w.open(d.method||"GET",d.url,!0),d.type!=="arrayBuffer"&&d.type!=="image"||(w.responseType="arraybuffer");for(const P in d.headers)w.setRequestHeader(P,d.headers[P]);d.type==="json"&&(w.responseType="text",!((S=d.headers)===null||S===void 0)&&S.Accept||w.setRequestHeader("Accept","application/json")),w.withCredentials=d.credentials==="include",w.onerror=()=>{y(new Error(w.statusText))},w.onload=()=>{if(!p.signal.aborted)if((w.status>=200&&w.status<300||w.status===0)&&w.response!==null){let P=w.response;if(d.type==="json")try{P=JSON.parse(w.response)}catch(T){return void y(T)}g({data:P,cacheControl:w.getResponseHeader("Cache-Control"),expires:w.getResponseHeader("Expires"),etag:w.getResponseHeader("ETag")})}else{const P=new Blob([w.response],{type:w.getResponseHeader("Content-Type")});y(new Va(w.status,w.statusText,d.url,P))}},p.signal.addEventListener("abort",()=>{w.abort(),y(new fc(p.signal.reason))}),w.send(d.body)})}(o,t)})};function Vi(o){if(!o||o.indexOf("://")<=0||o.startsWith("data:image/")||o.startsWith("blob:"))return!0;const t=new URL(o),i=window.location;return t.protocol===i.protocol&&t.host===i.host}function Ua(o,t,i){var l;!((l=i[o])===null||l===void 0)&&l.includes(t)||(i[o]||(i[o]=[]),i[o].push(t))}function Bs(o,t,i){if(i!=null&&i[o]){const l=i[o].indexOf(t);l!==-1&&i[o].splice(l,1)}}class mc{constructor(t,i={}){zt(this,i),this.type=t}}
457class $a extends mc{constructor(t,i={}){super("error",zt({error:t},i))}}class $u{on(t,i){return this._listeners||(this._listeners={}),Ua(t,i,this._listeners),{unsubscribe:()=>{this.off(t,i)}}}off(t,i){return Bs(t,i,this._listeners),Bs(t,i,this._oneTimeListeners),this}once(t,i){return i?(this._oneTimeListeners||(this._oneTimeListeners={}),Ua(t,i,this._oneTimeListeners),this):new Promise(l=>this.once(t,l))}fire(t,i){var l,d;typeof t=="string"&&(t=new mc(t,i||{}));const p=t.type;if(this.listens(p)){t.target=this;const g=!((l=this._listeners)===null||l===void 0)&&l[p]?this._listeners[p].slice():[];for(const w of g)w.call(this,t);const y=!((d=this._oneTimeListeners)===null||d===void 0)&&d[p]?this._oneTimeListeners[p].slice():[];for(const w of y)Bs(p,w,this._oneTimeListeners),w.call(this,t);const S=this._eventedParent;S&&(zt(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),S.fire(t))}else t instanceof $a&&console.error(t.error);return this}listens(t){var i,l,d,p,g;return((l=(i=this._listeners)===null||i===void 0?void 0:i[t])===null||l===void 0?void 0:l.length)>0||((p=(d=this._oneTimeListeners)===null||d===void 0?void 0:d[t])===null||p===void 0?void 0:p.length)>0||((g=this._eventedParent)===null||g===void 0?void 0:g.listens(t))}setEventedParent(t,i){return this._eventedParent=t,this._eventedParentData=i,this}}var Ue={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0}
vendor: 3,304 bytes, line 457
457,clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-
vendor: 8,538 bytes, line 457
457constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",
vendor: 6,583 bytes, line 457
457expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven
vendor: 12,722 bytes, line 457
457"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}}
457;const Ep=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Pp(o,t){const i={};for(const l in o)l!=="ref"&&(i[l]=o[l]);
vendor: 37,407 bytes, line 457
457return Ep.forEach(l=>{l in t&&(i[l]=t[l])}),i}function Yt(o,t){if(Array.isArray(o)){if(!Array.isArray(t)||o.length!==t.length)return!1;for(let i=0;i<o.length;i++)if(!Yt(o[i],t[i]))return!1;return!0}if(typeof o=="object"&&o!==null&&t!==null){if(typeof t!="object"||Object.keys(o).length!==Object.keys(t).length)return!1;for(const i in o)if(!Yt(o[i],t[i]))return!1;return!0}return o===t}function Hn(o,t){o.push(t)}function Vs(o,t,i){Hn(i,{command:"addSource",args:[o,t[o]]})}function Tg(o,t,i){Hn(t,{command:"removeSource",args:[o]}),i[o]=!0}function Eg(o,t,i,l){Tg(o,i,l),Vs(o,t,i)}function L0(o,t,i){let l;for(l in o[i])if(Object.prototype.hasOwnProperty.call(o[i],l)&&l!=="data"&&!Yt(o[i][l],t[i][l]))return!1;for(l in t[i])if(Object.prototype.hasOwnProperty.call(t[i],l)&&l!=="data"&&!Yt(o[i][l],t[i][l]))return!1;return!0}function Gu(o,t,i,l,d,p){o=o||{},t=t||{};for(const g in o)Object.prototype.hasOwnProperty.call(o,g)&&(Yt(o[g],t[g])||i.push({command:p,args:[l,g,t[g],d]}));for(const g in t)Object.prototype.hasOwnProperty.call(t,g)&&!Object.prototype.hasOwnProperty.call(o,g)&&(Yt(o[g],t[g])||i.push({command:p,args:[l,g,t[g],d]}))}function Cp(o){return o.id}function Pg(o,t){return o[t.id]=t,o}class et{constructor(t,i,l,d){this.message=(t?`${t}: `:"")+l,d&&(this.identifier=d),i!=null&&i.__line__&&(this.line=i.__line__)}}function Us(o,...t){for(const i of t)for(const l in i)o[l]=i[l];return o}class un extends Error{constructor(t,i){super(i),this.message=i,this.key=t}}class Ip{constructor(t,i=[]){this.parent=t,this.bindings={};for(const[l,d]of i)this.bindings[l]=d}concat(t){return new Ip(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const ss={kind:"null"},at={kind:"number"},It={kind:"string"},Dt={kind:"boolean"},oi={kind:"color"},qu={kind:"projectionDefinition"},Ao={kind:"object"},Mt={kind:"value"},gc={kind:"collator"},yc={kind:"formatted"},Wu={kind:"padding"},Ga={kind:"colorArray"},_c={kind:"numberArray"},qa={kind:"resolvedImage"},vc={kind:"variableAnchorOffsetCollection"};function dn(o,t){return{kind:"array",itemType:o,N:t}}function Jt(o){if(o.kind==="array"){const t=Jt(o.itemType);return typeof o.N=="number"?`array<${t}, ${o.N}>`:o.itemType.kind==="value"?"array":`array<${t}>`}return o.kind}const Zu=[ss,at,It,Dt,oi,qu,yc,Ao,dn(Mt),Wu,_c,Ga,qa,vc];function Wa(o,t){if(t.kind==="error")return null;if(o.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Wa(o.itemType,t.itemType))&&(typeof o.N!="number"||o.N===t.N))return null}else{if(o.kind===t.kind)return null;if(o.kind==="value"){for(const i of Zu)if(!Wa(i,t))return null}}return`Expected ${Jt(o)} but found ${Jt(t)} instead.`}function xc(o,t){return t.some(i=>i.kind===o.kind)}function $s(o,t){return t.some(i=>i==="null"?o===null:i==="array"?Array.isArray(o):i==="object"?o&&!Array.isArray(o)&&typeof o=="object":i===typeof o)}function Ui(o,t){return o.kind==="array"&&t.kind==="array"?o.itemType.kind===t.itemType.kind&&typeof o.N=="number":o.kind===t.kind}const Cg=.96422,Gs=.82521,Hu=4/29,wr=6/29,Ig=3*wr*wr,Mg=wr*wr*wr,bc=Math.PI/180,Ag=180/Math.PI;function Rg(o){return(o%=360)<0&&(o+=360),o}function kg([o,t,i,l]){let d,p;const g=Mp((.2225045*(o=Xu(o))+.7168786*(t=Xu(t))+.0606169*(i=Xu(i)))/1);o===t&&t===i?d=p=g:(d=Mp((.4360747*o+.3850649*t+.1430804*i)/Cg),p=Mp((.0139322*o+.0971045*t+.7141733*i)/Gs));const y=116*g-16;return[y<0?0:y,500*(d-g),200*(g-p),l]}function Xu(o){return o<=.04045?o/12.92:Math.pow((o+.055)/1.055,2.4)}function Mp(o){return o>Mg?Math.pow(o,1/3):o/Ig+Hu}function Ap([o,t,i,l]){let d=(o+16)/116,p=isNaN(t)?d:d+t/500,g=isNaN(i)?d:d-i/200;return d=1*kp(d),p=Cg*kp(p),g=Gs*kp(g),[Rp(3.1338561*p-1.6168667*d-.4906146*g),Rp(-.9787684*p+1.9161415*d+.033454*g),Rp(.0719453*p-.2289914*d+1.4052427*g),l]}function Rp(o){return(o=o<=.00304?12.92*o:1.055*Math.pow(o,1/2.4)-.055)<0?0:o>1?1:o}function kp(o){return o>wr?o*o*o:Ig*(o-Hu)}const z0=Object.hasOwn||function(o,t){return Object.prototype.hasOwnProperty.call(o,t)};function wc(o,t){return z0(o,t)?o[t]:void 0}function Ku(o){return parseInt(o.padEnd(2,o),16)/255}function Dg(o,t){return Za(t?o/100:o,0,1)}function Za(o,t,i){return Math.min(Math.max(t,o),i)}function Dp(o){return!o.some(Number.isNaN)}const Sc={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function as(o,t,i){return o+i*(t-o)}function Ha(o,t,i){return o.map((l,d)=>as(l,t[d],i))}class Rt{constructor(t,i,l,d=1,p=!0){this.r=t,this.g=i,this.b=l,this.a=d,p||(this.r*=d,this.g*=d,this.b*=d,d||this.overwriteGetter("rgb",[t,i,l,d]))}static parse(t){if(t instanceof Rt)return t;if(typeof t!="string")return;const i=function(l){if((l=l.toLowerCase().trim())==="transparent")return[0,0,0,0];const d=wc(Sc,l);if(d){const[g,y,S]=d;return[g/255,y/255,S/255,1]}if(l.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(l)){const g=l.length<6?1:2;let y=1;return[Ku(l.slice(y,y+=g)),Ku(l.slice(y,y+=g)),Ku(l.slice(y,y+=g)),Ku(l.slice(y,y+g)||"ff")]}if(l.startsWith("rgb")){const g=l.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(g){const[y,S,w,P,T,D,I,N,B,q,W,ee]=g,X=[P||" ",I||" ",q].join("");if(X==="  "||X==="  /"||X===",,"||X===",,,"){const te=[w,D,B].join(""),le=te==="%%%"?100:te===""?255:0;if(le){const he=[Za(+S/le,0,1),Za(+T/le,0,1),Za(+N/le,0,1),W?Dg(+W,ee):1];if(Dp(he))return he}}return}}const p=l.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[g,y,S,w,P,T,D,I,N]=p,B=[S||" ",P||" ",D].join("");if(B==="  "||B==="  /"||B===",,"||B===",,,"){const q=[+y,Za(+w,0,100),Za(+T,0,100),I?Dg(+I,N):1];if(Dp(q))return function([W,ee,X,te]){function le(he){const Se=(he+W/30)%12,Ee=ee*Math.min(X,1-X);return X-Ee*Math.max(-1,Math.min(Se-3,9-Se,1))}return W=Rg(W),ee/=100,X/=100,[le(0),le(8),le(4),te]}(q)}}}(t);return i?new Rt(...i,!1):void 0}get rgb(){const{r:t,g:i,b:l,a:d}=this,p=d||1/0;return this.overwriteGetter("rgb",[t/p,i/p,l/p,d])}get hcl(){return this.overwriteGetter("hcl",function(t){const[i,l,d,p]=kg(t),g=Math.sqrt(l*l+d*d);return[Math.round(1e4*g)?Rg(Math.atan2(d,l)*Ag):NaN,g,i,p]}(this.rgb))}get lab(){return this.overwriteGetter("lab",kg(this.rgb))}overwriteGetter(t,i){return Object.defineProperty(this,t,{value:i}),i}toString(){const[t,i,l,d]=this.rgb;return`rgba(${[t,i,l].map(p=>Math.round(255*p)).join(",")},${d})`}static interpolate(t,i,l,d="rgb"){switch(d){case"rgb":{const[p,g,y,S]=Ha(t.rgb,i.rgb,l);return new Rt(p,g,y,S,!1)}case"hcl":{const[p,g,y,S]=t.hcl,[w,P,T,D]=i.hcl;let I,N;if(isNaN(p)||isNaN(w))isNaN(p)?isNaN(w)?I=NaN:(I=w,y!==1&&y!==0||(N=P)):(I=p,T!==1&&T!==0||(N=g));else{let X=w-p;w>p&&X>180?X-=360:w<p&&p-w>180&&(X+=360),I=p+l*X}const[B,q,W,ee]=function([X,te,le,he]){return X=isNaN(X)?0:X*bc,Ap([le,Math.cos(X)*te,Math.sin(X)*te,he])}([I,N??as(g,P,l),as(y,T,l),as(S,D,l)]);return new Rt(B,q,W,ee,!1)}case"lab":{const[p,g,y,S]=Ap(Ha(t.lab,i.lab,l));return new Rt(p,g,y,S,!1)}}}}Rt.black=new Rt(0,0,0,1),Rt.white=new Rt(1,1,1,1),Rt.transparent=new Rt(0,0,0,0),Rt.red=new Rt(1,0,0,1);class Lp{constructor(t,i,l){this.sensitivity=t?i?"variant":"case":i?"accent":"base",this.locale=l,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,i){return this.collator.compare(t,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const O0=["bottom","center","top"];class zp{constructor(t,i,l,d,p,g){this.text=t,this.image=i,this.scale=l,this.fontStack=d,this.textColor=p,this.verticalAlign=g}}class Xn{constructor(t){this.sections=t}static fromString(t){return new Xn([new zp(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof Xn?t:Xn.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class wn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof wn)return t;if(typeof t=="number")return new wn([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const i of t)if(typeof i!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new wn(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,l){return new wn(Ha(t.values,i.values,l))}}class gr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof gr)return t;if(typeof t=="number")return new gr([t]);if(Array.isArray(t)){for(const i of t)if(typeof i!="number")return;return new gr(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,l){return new gr(Ha(t.values,i.values,l))}}class Et{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Et)return t;if(typeof t=="string"){const l=Rt.parse(t);return l?new Et([l]):void 0}if(!Array.isArray(t))return;const i=[];for(const l of t){if(typeof l!="string")return;const d=Rt.parse(l);if(!d)return;i.push(d)}return new Et(i)}toString(){return JSON.stringify(this.values)}static interpolate(t,i,l,d="rgb"){const p=[];if(t.values.length!=i.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${i.values.length}), cannot interpolate.`);for(let g=0;g<t.values.length;g++)p.push(Rt.interpolate(t.values[g],i.values[g],l,d));return new Et(p)}}class nr extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}}const ls=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class zn{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof zn)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let i=0;i<t.length;i+=2){const l=t[i],d=t[i+1];if(typeof l!="string"||!ls.has(l)||!Array.isArray(d)||d.length!==2||typeof d[0]!="number"||typeof d[1]!="number")return}return new zn(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,l){const d=t.values,p=i.values;if(d.length!==p.length)throw new nr(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${i.toString()}`);const g=[];for(let y=0;y<d.length;y+=2){if(d[y]!==p[y])throw new nr(`Cannot interpolate values containing mismatched anchors. from[${y}]: ${d[y]}, to[${y}]: ${p[y]}`);g.push(d[y]);const[S,w]=d[y+1],[P,T]=p[y+1];g.push([as(S,P,l),as(w,T,l)])}return new zn(g)}}class si{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new si({name:t,available:!1}):null}}class On{constructor(t,i,l){this.from=t,this.to=i,this.transition=l}static interpolate(t,i,l){return new On(t,i,l)}static parse(t){return t instanceof On?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new On(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new On(t.from,t.to,t.transition):typeof t=="string"?new On(t,t,1):void 0}}function Xa(o,t,i,l){return typeof o=="number"&&o>=0&&o<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof i=="number"&&i>=0&&i<=255?l===void 0||typeof l=="number"&&l>=0&&l<=1?null:`Invalid rgba value [${[o,t,i,l].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof l=="number"?[o,t,i,l]:[o,t,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function cs(o){if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"||o instanceof On||o instanceof Rt||o instanceof Lp||o instanceof Xn||o instanceof wn||o instanceof gr||o instanceof Et||o instanceof zn||o instanceof si)return!0;if(Array.isArray(o)){for(const t of o)if(!cs(t))return!1;return!0}if(typeof o=="object"){for(const t in o)if(!cs(o[t]))return!1;return!0}return!1}function Mr(o){if(o===null)return ss;if(typeof o=="string")return It;if(typeof o=="boolean")return Dt;if(typeof o=="number")return at;if(o instanceof Rt)return oi;if(o instanceof On)return qu;if(o instanceof Lp)return gc;if(o instanceof Xn)return yc;if(o instanceof wn)return Wu;if(o instanceof gr)return _c;if(o instanceof Et)return Ga;if(o instanceof zn)return vc;if(o instanceof si)return qa;if(Array.isArray(o)){const t=o.length;let i;for(const l of o){const d=Mr(l);if(i){if(i===d)continue;i=Mt;break}i=d}return dn(i||Mt,t)}return Ao}function qs(o){const t=typeof o;return o===null?"":t==="string"||t==="number"||t==="boolean"?String(o):o instanceof Rt||o instanceof On||o instanceof Xn||o instanceof wn||o instanceof gr||o instanceof Et||o instanceof zn||o instanceof si?o.toString():JSON.stringify(o)}class co{constructor(t,i){this.type=t,this.value=i}static parse(t,i){if(t.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!cs(t[1]))return i.error("invalid value");const l=t[1];let d=Mr(l);const p=i.expectedType;return d.kind!=="array"||d.N!==0||!p||p.kind!=="array"||typeof p.N=="number"&&p.N!==0||(d=p),new co(d,l)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Yu={string:It,number:at,boolean:Dt,object:Ao};class Kn{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let l,d=1;const p=t[0];if(p==="array"){let y,S;if(t.length>2){const w=t[1];if(typeof w!="string"||!(w in Yu)||w==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);y=Yu[w],d++}else y=Mt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return i.error('The length argument to "array" must be a positive integer literal',2);S=t[2],d++}l=dn(y,S)}else{if(!Yu[p])throw new Error(`Types doesn't contain name = ${p}`);l=Yu[p]}const g=[];for(;d<t.length;d++){const y=i.parse(t[d],d,Mt);if(!y)return null;g.push(y)}return new Kn(l,g)}evaluate(t){for(let i=0;i<this.args.length;i++){const l=this.args[i].evaluate(t);if(!Wa(this.type,Mr(l)))return l;if(i===this.args.length-1)throw new nr(`Expected value to be of type ${Jt(this.type)}, but found ${Jt(Mr(l))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Ws={"to-boolean":Dt,"to-color":oi,"to-number":at,"to-string":It};class Ro{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const l=t[0];if(!Ws[l])throw new Error(`Can't parse ${l} as it is not part of the known types`);if((l==="to-boolean"||l==="to-string")&&t.length!==2)return i.error("Expected one argument.");const d=Ws[l],p=[];for(let g=1;g<t.length;g++){const y=i.parse(t[g],g,Mt);if(!y)return null;p.push(y)}return new Ro(d,p)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let i,l;for(const d of this.args){if(i=d.evaluate(t),l=null,i instanceof Rt)return i;if(typeof i=="string"){const p=t.parseColor(i);if(p)return p}else if(Array.isArray(i)&&(l=i.length<3||i.length>4?`Invalid rgba value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Xa(i[0],i[1],i[2],i[3]),!l))return new Rt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new nr(l||`Could not parse color from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"padding":{let i;for(const l of this.args){i=l.evaluate(t);const d=wn.parse(i);if(d)return d}throw new nr(`Could not parse padding from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"numberArray":{let i;for(const l of this.args){i=l.evaluate(t);const d=gr.parse(i);if(d)return d}throw new nr(`Could not parse numberArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"colorArray":{let i;for(const l of this.args){i=l.evaluate(t);const d=Et.parse(i);if(d)return d}throw new nr(`Could not parse colorArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"variableAnchorOffsetCollection":{let i;for(const l of this.args){i=l.evaluate(t);const d=zn.parse(i);if(d)return d}throw new nr(`Could not parse variableAnchorOffsetCollection from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"number":{let i=null;for(const l of this.args){if(i=l.evaluate(t),i===null)return 0;const d=Number(i);if(!isNaN(d))return d}throw new nr(`Could not convert ${JSON.stringify(i)} to number.`)}case"formatted":return Xn.fromString(qs(this.args[0].evaluate(t)));case"resolvedImage":return si.fromString(qs(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return qs(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Lg=["Unknown","Point","LineString","Polygon"];class Op{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Lg[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let i=this._parseColorCache.get(t);return i||(i=Rt.parse(t),this._parseColorCache.set(t,i)),i}}class Zs{constructor(t,i,l=[],d,p=new Ip,g=[]){this.registry=t,this.path=l,this.key=l.map(y=>`[${y}]`).join(""),this.scope=p,this.errors=g,this.expectedType=d,this._isConstant=i}parse(t,i,l,d,p={}){return i?this.concat(i,l,d)._parse(t,p):this._parse(t,p)}_parse(t,i){function l(d,p,g){return g==="assert"?new Kn(p,[d]):g==="coerce"?new Ro(p,[d]):d}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const d=t[0];if(typeof d!="string")return this.error(`Expression name must be a string, but found ${typeof d} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const p=this.registry[d];if(p){let g=p.parse(t,this);if(!g)return null;if(this.expectedType){const y=this.expectedType,S=g.type;if(y.kind!=="string"&&y.kind!=="number"&&y.kind!=="boolean"&&y.kind!=="object"&&y.kind!=="array"||S.kind!=="value"){if(y.kind==="projectionDefinition"&&["string","array"].includes(S.kind)||["color","formatted","resolvedImage"].includes(y.kind)&&["value","string"].includes(S.kind)||["padding","numberArray"].includes(y.kind)&&["value","number","array"].includes(S.kind)||y.kind==="colorArray"&&["value","string","array"].includes(S.kind)||y.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(S.kind))g=l(g,y,i.typeAnnotation||"coerce");else if(this.checkSubtype(y,S))return null}else g=l(g,y,i.typeAnnotation||"assert")}if(!(g instanceof co)&&g.type.kind!=="resolvedImage"&&this._isConstant(g)){const y=new Op;try{g=new co(g.type,g.evaluate(y))}catch(S){return this.error(S.message),null}}return g}return this.error(`Unknown expression "${d}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,i,l){const d=typeof t=="number"?this.path.concat(t):this.path,p=l?this.scope.concat(l):this.scope;return new Zs(this.registry,this._isConstant,d,i||null,p,this.errors)}error(t,...i){const l=`${this.key}${i.map(d=>`[${d}]`).join("")}`;this.errors.push(new un(l,t))}checkSubtype(t,i){const l=Wa(t,i);return l&&this.error(l),l}}class ir{constructor(t,i){this.type=i.type,this.bindings=[].concat(t),this.result=i}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const i of this.bindings)t(i[1]);t(this.result)}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const l=[];for(let p=1;p<t.length-1;p+=2){const g=t[p];if(typeof g!="string")return i.error(`Expected string, but found ${typeof g} instead.`,p);if(/[^a-zA-Z0-9_]/.test(g))return i.error("Variable names must contain only alphanumeric characters or '_'.",p);const y=i.parse(t[p+1],p+1);if(!y)return null;l.push([g,y])}const d=i.parse(t[t.length-1],t.length-1,i.expectedType,l);return d?new ir(l,d):null}outputDefined(){return this.result.outputDefined()}}class Ka{constructor(t,i){this.type=i.type,this.name=t,this.boundExpression=i}static parse(t,i){if(t.length!==2||typeof t[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const l=t[1];return i.scope.has(l)?new Ka(l,i.scope.get(l)):i.error(`Unknown variable "${l}". Make sure "${l}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class Nt{constructor(t,i,l){this.type=t,this.index=i,this.input=l}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const l=i.parse(t[1],1,at),d=i.parse(t[2],2,dn(i.expectedType||Mt));return l&&d?new Nt(d.type.itemType,l,d):null}evaluate(t){const i=this.index.evaluate(t),l=this.input.evaluate(t);if(i<0)throw new nr(`Array index out of bounds: ${i} < 0.`);if(i>=l.length)throw new nr(`Array index out of bounds: ${i} > ${l.length-1}.`);if(i!==Math.floor(i))throw new nr(`Array index must be an integer, but found ${i} instead.`);return l[i]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class At{constructor(t,i){this.type=Dt,this.needle=t,this.haystack=i}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const l=i.parse(t[1],1,Mt),d=i.parse(t[2],2,Mt);return l&&d?xc(l.type,[Dt,It,at,ss,Mt])?new At(l,d):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Jt(l.type)} instead`):null}evaluate(t){const i=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!l)return!1;if(!$s(i,["boolean","string","number","null"]))throw new nr(`Expected first argument to be of type boolean, string, number or null, but found ${Jt(Mr(i))} instead.`);if(!$s(l,["string","array"]))throw new nr(`Expected second argument to be of type array or string, but found ${Jt(Mr(l))} instead.`);return l.indexOf(i)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class Ya{constructor(t,i,l){this.type=at,this.needle=t,this.haystack=i,this.fromIndex=l}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const l=i.parse(t[1],1,Mt),d=i.parse(t[2],2,Mt);if(!l||!d)return null;if(!xc(l.type,[Dt,It,at,ss,Mt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${Jt(l.type)} instead`);if(t.length===4){const p=i.parse(t[3],3,at);return p?new Ya(l,d,p):null}return new Ya(l,d)}evaluate(t){const i=this.needle.evaluate(t),l=this.haystack.evaluate(t);if(!$s(i,["boolean","string","number","null"]))throw new nr(`Expected first argument to be of type boolean, string, number or null, but found ${Jt(Mr(i))} instead.`);let d;if(this.fromIndex&&(d=this.fromIndex.evaluate(t)),$s(l,["string"])){const p=l.indexOf(i,d);return p===-1?-1:[...l.slice(0,p)].length}if($s(l,["array"]))return l.indexOf(i,d);throw new nr(`Expected second argument to be of type array or string, but found ${Jt(Mr(l))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class Bt{constructor(t,i,l,d,p,g){this.inputType=t,this.type=i,this.input=l,this.cases=d,this.outputs=p,this.otherwise=g}static parse(t,i){if(t.length<5)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return i.error("Expected an even number of arguments.");let l,d;i.expectedType&&i.expectedType.kind!=="value"&&(d=i.expectedType);const p={},g=[];for(let w=2;w<t.length-1;w+=2){let P=t[w];const T=t[w+1];Array.isArray(P)||(P=[P]);const D=i.concat(w);if(P.length===0)return D.error("Expected at least one branch label.");for(const N of P){if(typeof N!="number"&&typeof N!="string")return D.error("Branch labels must be numbers or strings.");if(typeof N=="number"&&Math.abs(N)>Number.MAX_SAFE_INTEGER)return D.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof N=="number"&&Math.floor(N)!==N)return D.error("Numeric branch labels must be integer values.");if(l){if(D.checkSubtype(l,Mr(N)))return null}else l=Mr(N);if(p[String(N)]!==void 0)return D.error("Branch labels must be unique.");p[String(N)]=g.length}const I=i.parse(T,w,d);if(!I)return null;d=d||I.type,g.push(I)}const y=i.parse(t[1],1,Mt);if(!y)return null;const S=i.parse(t[t.length-1],t.length-1,d);return S?y.type.kind!=="value"&&i.concat(1).checkSubtype(l,y.type)?null:new Bt(l,d,y,p,g,S):null}evaluate(t){const i=this.input.evaluate(t);return(Mr(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class $i{constructor(t,i,l){this.type=t,this.branches=i,this.otherwise=l}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return i.error("Expected an odd number of arguments.");let l;i.expectedType&&i.expectedType.kind!=="value"&&(l=i.expectedType);const d=[];for(let g=1;g<t.length-1;g+=2){const y=i.parse(t[g],g,Dt);if(!y)return null;const S=i.parse(t[g+1],g+1,l);if(!S)return null;d.push([y,S]),l=l||S.type}const p=i.parse(t[t.length-1],t.length-1,l);if(!p)return null;if(!l)throw new Error("Can't infer output type");return new $i(l,d,p)}evaluate(t){for(const[i,l]of this.branches)if(i.evaluate(t))return l.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[i,l]of this.branches)t(i),t(l);t(this.otherwise)}outputDefined(){return this.branches.every(([t,i])=>i.outputDefined())&&this.otherwise.outputDefined()}}class Qa{constructor(t,i,l,d){this.type=t,this.input=i,this.beginIndex=l,this.endIndex=d}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);const l=i.parse(t[1],1,Mt),d=i.parse(t[2],2,at);if(!l||!d)return null;if(!xc(l.type,[dn(Mt),It,Mt]))return i.error(`Expected first argument to be of type array or string, but found ${Jt(l.type)} instead`);if(t.length===4){const p=i.parse(t[3],3,at);return p?new Qa(l.type,l,d,p):null}return new Qa(l.type,l,d)}evaluate(t){const i=this.input.evaluate(t),l=this.beginIndex.evaluate(t);let d;if(this.endIndex&&(d=this.endIndex.evaluate(t)),$s(i,["string"]))return[...i].slice(l,d).join("");if($s(i,["array"]))return i.slice(l,d);throw new nr(`Expected first argument to be of type array or string, but found ${Jt(Mr(i))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function Hs(o,t){const i=o.length-1;let l,d,p=0,g=i,y=0;for(;p<=g;)if(y=Math.floor((p+g)/2),l=o[y],d=o[y+1],l<=t){if(y===i||t<d)return y;p=y+1}else{if(!(l>t))throw new nr("Input is not a number.");g=y-1}return 0}class Ja{constructor(t,i,l){this.type=t,this.input=i,this.labels=[],this.outputs=[];for(const[d,p]of l)this.labels.push(d),this.outputs.push(p)}static parse(t,i){if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");const l=i.parse(t[1],1,at);if(!l)return null;const d=[];let p=null;i.expectedType&&i.expectedType.kind!=="value"&&(p=i.expectedType);for(let g=1;g<t.length;g+=2){const y=g===1?-1/0:t[g],S=t[g+1],w=g,P=g+1;if(typeof y!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',w);if(d.length&&d[d.length-1][0]>=y)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',w);const T=i.parse(S,P,p);if(!T)return null;p=p||T.type,d.push([y,T])}return new Ja(p,l,d)}evaluate(t){const i=this.labels,l=this.outputs;if(i.length===1)return l[0].evaluate(t);const d=this.input.evaluate(t);if(d<=i[0])return l[0].evaluate(t);const p=i.length;return d>=i[p-1]?l[p-1].evaluate(t):l[Hs(i,d)].evaluate(t)}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Fp(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Qu,zg,Og=function(){if(zg)return Qu;function o(t,i,l,d){this.cx=3*t,this.bx=3*(l-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(d-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=l,this.p2y=d}return zg=1,Qu=o,o.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var l=t,d=0;d<8;d++){var p=this.sampleCurveX(l)-t;if(Math.abs(p)<i)return l;var g=this.sampleCurveDerivativeX(l);if(Math.abs(g)<1e-6)break;l-=p/g}var y=0,S=1;for(l=t,d=0;d<20&&(p=this.sampleCurveX(l),!(Math.abs(p-t)<i));d++)t>p?y=l:S=l,l=.5*(S-y)+y;return l},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},Qu}(),Fg=Fp(Og);class Dr{constructor(t,i,l,d,p){this.type=t,this.operator=i,this.interpolation=l,this.input=d,this.labels=[],this.outputs=[];for(const[g,y]of p)this.labels.push(g),this.outputs.push(y)}static interpolationFactor(t,i,l,d){let p=0;if(t.name==="exponential")p=Yr(i,t.base,l,d);else if(t.name==="linear")p=Yr(i,1,l,d);else if(t.name==="cubic-bezier"){const g=t.controlPoints;p=new Fg(g[0],g[1],g[2],g[3]).solve(Yr(i,1,l,d))}return p}static parse(t,i){let[l,d,p,...g]=t;if(!Array.isArray(d)||d.length===0)return i.error("Expected an interpolation type expression.",1);if(d[0]==="linear")d={name:"linear"};else if(d[0]==="exponential"){const w=d[1];if(typeof w!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);d={name:"exponential",base:w}}else{if(d[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(d[0])}`,1,0);{const w=d.slice(1);if(w.length!==4||w.some(P=>typeof P!="number"||P<0||P>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);d={name:"cubic-bezier",controlPoints:w}}}if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(p=i.parse(p,2,at),!p)return null;const y=[];let S=null;l!=="interpolate-hcl"&&l!=="interpolate-lab"||i.expectedType==Ga?i.expectedType&&i.expectedType.kind!=="value"&&(S=i.expectedType):S=oi;for(let w=0;w<g.length;w+=2){const P=g[w],T=g[w+1],D=w+3,I=w+4;if(typeof P!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',D);if(y.length&&y[y.length-1][0]>=P)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',D);const N=i.parse(T,I,S);if(!N)return null;S=S||N.type,y.push([P,N])}return Ui(S,at)||Ui(S,qu)||Ui(S,oi)||Ui(S,Wu)||Ui(S,_c)||Ui(S,Ga)||Ui(S,vc)||Ui(S,dn(at))?new Dr(S,l,d,p,y):i.error(`Type ${Jt(S)} is not interpolatable.`)}evaluate(t){const i=this.labels,l=this.outputs;if(i.length===1)return l[0].evaluate(t);const d=this.input.evaluate(t);if(d<=i[0])return l[0].evaluate(t);const p=i.length;if(d>=i[p-1])return l[p-1].evaluate(t);const g=Hs(i,d),y=Dr.interpolationFactor(this.interpolation,d,i[g],i[g+1]),S=l[g].evaluate(t),w=l[g+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return as(S,w,y);case"color":return Rt.interpolate(S,w,y);case"padding":return wn.interpolate(S,w,y);case"colorArray":return Et.interpolate(S,w,y);case"numberArray":return gr.interpolate(S,w,y);case"variableAnchorOffsetCollection":return zn.interpolate(S,w,y);case"array":return Ha(S,w,y);case"projectionDefinition":return On.interpolate(S,w,y)}case"interpolate-hcl":switch(this.type.kind){case"color":return Rt.interpolate(S,w,y,"hcl");case"colorArray":return Et.interpolate(S,w,y,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Rt.interpolate(S,w,y,"lab");case"colorArray":return Et.interpolate(S,w,y,"lab")}}}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Yr(o,t,i,l){const d=l-i,p=o-i;return d===0?0:t===1?p/d:(Math.pow(t,p)-1)/(Math.pow(t,d)-1)}const ai={color:Rt.interpolate,number:as,padding:wn.interpolate,numberArray:gr.interpolate,colorArray:Et.interpolate,variableAnchorOffsetCollection:zn.interpolate,array:Ha};class Tc{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let l=null;const d=i.expectedType;d&&d.kind!=="value"&&(l=d);const p=[];for(const y of t.slice(1)){const S=i.parse(y,1+p.length,l,void 0,{typeAnnotation:"omit"});if(!S)return null;l=l||S.type,p.push(S)}if(!l)throw new Error("No output type");const g=d&&p.some(y=>Wa(d,y.type));return new Tc(g?Mt:l,p)}evaluate(t){let i,l=null,d=0;for(const p of this.args)if(d++,l=p.evaluate(t),l&&l instanceof si&&!l.available&&(i||(i=l.name),l=null,d===this.args.length&&(l=i)),l!==null)break;return l}
457eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function Ec(o,t){return o==="=="||o==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Zr(o,t,i,l){return l.compare(t,i)===0}function Xs(o,t,i){const l=o!=="=="&&o!=="!=";return class _L{constructor(p,g,y){this.type=Dt,this.lhs=p,this.rhs=g,this.collator=y,this.hasUntypedArgument=p.type.kind==="value"||g.type.kind==="value"}static parse(p,g){if(p.length!==3&&p.length!==4)return g.error("Expected two or three arguments.");const y=p[0];let S=g.parse(p[1],1,Mt);if(!S)return null;if(!Ec(y,S.type))return g.concat(1).error(`"${y}" comparisons are not supported for type '${Jt(S.type)}'.`);let w=g.parse(p[2],2,Mt);if(!w)return null;if(!Ec(y,w.type))return g.concat(2).error(`"${y}" comparisons are not supported for type '${Jt(w.type)}'.`);if(S.type.kind!==w.type.kind&&S.type.kind!=="value"&&w.type.kind!=="value")return g.error(`Cannot compare types '${Jt(S.type)}' and '${Jt(w.type)}'.`);l&&(S.type.kind==="value"&&w.type.kind!=="value"?S=new Kn(w.type,[S]):S.type.kind!=="value"&&w.type.kind==="value"&&(w=new Kn(S.type,[w])));let P=null;if(p.length===4){if(S.type.kind!=="string"&&w.type.kind!=="string"&&S.type.kind!=="value"&&w.type.kind!=="value")return g.error("Cannot use collator to compare non-string types.");if(P=g.parse(p[3],3,gc),!P)return null}return new _L(S,w,P)}evaluate(p){const g=this.lhs.evaluate(p),y=this.rhs.evaluate(p);if(l&&this.hasUntypedArgument){const S=Mr(g),w=Mr(y);if(S.kind!==w.kind||S.kind!=="string"&&S.kind!=="number")throw new nr(`Expected arguments for "${o}" to be (string, string) or (number, number), but found (${S.kind}, ${w.kind}) instead.`)}if(this.collator&&!l&&this.hasUntypedArgument){const S=Mr(g),w=Mr(y);if(S.kind!=="string"||w.kind!=="string")return t(p,g,y)}return this.collator?i(p,g,y,this.collator.evaluate(p)):t(p,g,y)}eachChild(p){p(this.lhs),p(this.rhs),this.collator&&p(this.collator)}outputDefined(){return!0}}}const jp=Xs("==",function(o,t,i){return t===i},Zr),jg=Xs("!=",function(o,t,i){return t!==i},function(o,t,i,l){return!Zr(0,t,i,l)}),F0=Xs("<",function(o,t,i){return t<i},function(o,t,i,l){return l.compare(t,i)<0}),el=Xs(">",function(o,t,i){return t>i},function(o,t,i,l){return l.compare(t,i)>0}),Ju=Xs("<=",function(o,t,i){return t<=i},function(o,t,i,l){return l.compare(t,i)<=0}),Np=Xs(">=",function(o,t,i){return t>=i},function(o,t,i,l){return l.compare(t,i)>=0});class ed{constructor(t,i,l){this.type=gc,this.locale=l,this.caseSensitive=t,this.diacriticSensitive=i}static parse(t,i){if(t.length!==2)return i.error("Expected one argument.");const l=t[1];if(typeof l!="object"||Array.isArray(l))return i.error("Collator options argument must be an object.");const d=i.parse(l["case-sensitive"]!==void 0&&l["case-sensitive"],1,Dt);if(!d)return null;const p=i.parse(l["diacritic-sensitive"]!==void 0&&l["diacritic-sensitive"],1,Dt);if(!p)return null;let g=null;return l.locale&&(g=i.parse(l.locale,1,It),!g)?null:new ed(d,p,g)}evaluate(t){return new Lp(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class td{constructor(t,i,l,d,p,g){this.type=It,this.number=t,this.locale=i,this.currency=l,this.unit=d,this.minFractionDigits=p,this.maxFractionDigits=g}static parse(t,i){if(t.length!==3)return i.error("Expected two arguments.");const l=i.parse(t[1],1,at);if(!l)return null;const d=t[2];if(typeof d!="object"||Array.isArray(d))return i.error("NumberFormat options argument must be an object.");let p=null;if(d.locale&&(p=i.parse(d.locale,1,It),!p))return null;let g=null;if(d.currency&&(g=i.parse(d.currency,1,It),!g))return null;let y=null;if(d.unit&&(y=i.parse(d.unit,1,It),!y))return null;if(g&&y)return i.error("NumberFormat options `currency` and `unit` are mutually exclusive");let S=null;if(d["min-fraction-digits"]&&(S=i.parse(d["min-fraction-digits"],1,at),!S))return null;let w=null;return d["max-fraction-digits"]&&(w=i.parse(d["max-fraction-digits"],1,at),!w)?null:new td(l,p,g,y,S,w)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,unit:this.unit?this.unit.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.unit&&t(this.unit),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class Ks{constructor(t){this.type=yc,this.sections=t}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const l=t[1];if(!Array.isArray(l)&&typeof l=="object")return i.error("First argument must be an image or text section.");const d=[];let p=!1;for(let g=1;g<=t.length-1;++g){const y=t[g];if(p&&typeof y=="object"&&!Array.isArray(y)){p=!1;let S=null;if(y["font-scale"]&&(S=i.parse(y["font-scale"],1,at),!S))return null;let w=null;if(y["text-font"]&&(w=i.parse(y["text-font"],1,dn(It)),!w))return null;let P=null;if(y["text-color"]&&(P=i.parse(y["text-color"],1,oi),!P))return null;let T=null;if(y["vertical-align"]){if(typeof y["vertical-align"]=="string"&&!O0.includes(y["vertical-align"]))return i.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${y["vertical-align"]}' instead.`);if(T=i.parse(y["vertical-align"],1,It),!T)return null}const D=d[d.length-1];D.scale=S,D.font=w,D.textColor=P,D.verticalAlign=T}else{const S=i.parse(t[g],1,Mt);if(!S)return null;
vendor: 15,024 bytes, line 457
457const w=S.type.kind;if(w!=="string"&&w!=="value"&&w!=="null"&&w!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");p=!0,d.push({content:S,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Ks(d)}evaluate(t){return new Xn(this.sections.map(i=>{const l=i.content.evaluate(t);return Mr(l)===qa?new zp("",l,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(t):null):new zp(qs(l),null,i.scale?i.scale.evaluate(t):null,i.font?i.font.evaluate(t).join(","):null,i.textColor?i.textColor.evaluate(t):null,i.verticalAlign?i.verticalAlign.evaluate(t):null)}))}eachChild(t){for(const i of this.sections)t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor),i.verticalAlign&&t(i.verticalAlign)}outputDefined(){return!1}}class tl{constructor(t){this.type=qa,this.input=t}static parse(t,i){if(t.length!==2)return i.error("Expected two arguments.");const l=i.parse(t[1],1,It);return l?new tl(l):i.error("No image name provided.")}evaluate(t){const i=this.input.evaluate(t),l=si.fromString(i);return l&&t.availableImages&&(l.available=t.availableImages.indexOf(i)>-1),l}eachChild(t){t(this.input)}outputDefined(){return!1}}class li{constructor(t){this.type=at,this.input=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const l=i.parse(t[1],1);return l?l.type.kind!=="array"&&l.type.kind!=="string"&&l.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${Jt(l.type)} instead.`):new li(l):null}evaluate(t){const i=this.input.evaluate(t);if(typeof i=="string")return[...i].length;if(Array.isArray(i))return i.length;throw new nr(`Expected value to be of type string or array, but found ${Jt(Mr(i))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const Gi=8192;function rd(o,t){const i=(180+o[0])/360,l=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o[1]*Math.PI/360)))/360,d=Math.pow(2,t.z);return[Math.round(i*d*Gi),Math.round(l*d*Gi)]}function Bp(o,t){const i=Math.pow(2,t.z);return[(d=(o[0]/Gi+t.x)/i,360*d-180),(l=(o[1]/Gi+t.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*l)*Math.PI/180))-90)];var l,d}function Ys(o,t){o[0]=Math.min(o[0],t[0]),o[1]=Math.min(o[1],t[1]),o[2]=Math.max(o[2],t[0]),o[3]=Math.max(o[3],t[1])}function Pc(o,t){return!(o[0]<=t[0]||o[2]>=t[2]||o[1]<=t[1]||o[3]>=t[3])}function j0(o,t,i){const l=o[0]-t[0],d=o[1]-t[1],p=o[0]-i[0],g=o[1]-i[1];return l*g-p*d==0&&l*p<=0&&d*g<=0}function nd(o,t,i,l){return(d=[l[0]-i[0],l[1]-i[1]])[0]*(p=[t[0]-o[0],t[1]-o[1]])[1]-d[1]*p[0]!=0&&!(!Bg(o,t,i,l)||!Bg(i,l,o,t));var d,p}function N0(o,t,i){for(const l of i)for(let d=0;d<l.length-1;++d)if(nd(o,t,l[d],l[d+1]))return!0;return!1}function ko(o,t,i=!1){let l=!1;for(const y of t)for(let S=0;S<y.length-1;S++){if(j0(o,y[S],y[S+1]))return i;(p=y[S])[1]>(d=o)[1]!=(g=y[S+1])[1]>d[1]&&d[0]<(g[0]-p[0])*(d[1]-p[1])/(g[1]-p[1])+p[0]&&(l=!l)}var d,p,g;return l}function B0(o,t){for(const i of t)if(ko(o,i))return!0;return!1}function Vp(o,t){for(const i of o)if(!ko(i,t))return!1;for(let i=0;i<o.length-1;++i)if(N0(o[i],o[i+1],t))return!1;return!0}function Ng(o,t){for(const i of t)if(Vp(o,i))return!0;return!1}function Bg(o,t,i,l){const d=l[0]-i[0],p=l[1]-i[1],g=(o[0]-i[0])*p-d*(o[1]-i[1]),y=(t[0]-i[0])*p-d*(t[1]-i[1]);return g>0&&y<0||g<0&&y>0}function id(o,t,i){const l=[];for(let d=0;d<o.length;d++){const p=[];for(let g=0;g<o[d].length;g++){const y=rd(o[d][g],i);Ys(t,y),p.push(y)}l.push(p)}return l}function Vg(o,t,i){const l=[];for(let d=0;d<o.length;d++){const p=id(o[d],t,i);l.push(p)}return l}function Ug(o,t,i,l){if(o[0]<i[0]||o[0]>i[2]){const d=.5*l;let p=o[0]-i[0]>d?-l:i[0]-o[0]>d?l:0;p===0&&(p=o[0]-i[2]>d?-l:i[2]-o[0]>d?l:0),o[0]+=p}Ys(t,o)}function $g(o,t,i,l){const d=Math.pow(2,l.z)*Gi,p=[l.x*Gi,l.y*Gi],g=[];for(const y of o)for(const S of y){const w=[S.x+p[0],S.y+p[1]];Ug(w,t,i,d),g.push(w)}return g}function Gg(o,t,i,l){const d=Math.pow(2,l.z)*Gi,p=[l.x*Gi,l.y*Gi],g=[];for(const S of o){const w=[];for(const P of S){const T=[P.x+p[0],P.y+p[1]];Ys(t,T),w.push(T)}g.push(w)}if(t[2]-t[0]<=d/2){(y=t)[0]=y[1]=1/0,y[2]=y[3]=-1/0;for(const S of g)for(const w of S)Ug(w,t,i,d)}var y;return g}class Qs{constructor(t,i){this.type=Dt,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(cs(t[1])){const l=t[1];if(l.type==="FeatureCollection"){const d=[];for(const p of l.features){const{type:g,coordinates:y}=p.geometry;g==="Polygon"&&d.push(y),g==="MultiPolygon"&&d.push(...y)}if(d.length)return new Qs(l,{type:"MultiPolygon",coordinates:d})}else if(l.type==="Feature"){const d=l.geometry.type;if(d==="Polygon"||d==="MultiPolygon")return new Qs(l,l.geometry)}else if(l.type==="Polygon"||l.type==="MultiPolygon")return new Qs(l,l)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,l){const d=[1/0,1/0,-1/0,-1/0],p=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(l.type==="Polygon"){const y=id(l.coordinates,p,g),S=$g(i.geometry(),d,p,g);if(!Pc(d,p))return!1;for(const w of S)if(!ko(w,y))return!1}if(l.type==="MultiPolygon"){const y=Vg(l.coordinates,p,g),S=$g(i.geometry(),d,p,g);if(!Pc(d,p))return!1;for(const w of S)if(!B0(w,y))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,l){const d=[1/0,1/0,-1/0,-1/0],p=[1/0,1/0,-1/0,-1/0],g=i.canonicalID();if(l.type==="Polygon"){const y=id(l.coordinates,p,g),S=Gg(i.geometry(),d,p,g);if(!Pc(d,p))return!1;for(const w of S)if(!Vp(w,y))return!1}if(l.type==="MultiPolygon"){const y=Vg(l.coordinates,p,g),S=Gg(i.geometry(),d,p,g);if(!Pc(d,p))return!1;for(const w of S)if(!Ng(w,y))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Up=class{constructor(o=[],t=(i,l)=>i<l?-1:i>l?1:0){if(this.data=o,this.length=this.data.length,this.compare=t,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(o){this.data.push(o),this._up(this.length++)}pop(){if(this.length===0)return;const o=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),o}peek(){return this.data[0]}_up(o){const{data:t,compare:i}=this,l=t[o];for(;o>0;){const d=o-1>>1,p=t[d];if(i(l,p)>=0)break;t[o]=p,o=d}t[o]=l}_down(o){const{data:t,compare:i}=this,l=this.length>>1,d=t[o];for(;o<l;){let p=1+(o<<1);const g=p+1;if(g<this.length&&i(t[g],t[p])<0&&(p=g),i(t[p],d)>=0)break;t[o]=t[p],o=p}t[o]=d}};function $p(o,t,i=0,l=o.length-1,d=V0){for(;l>i;){if(l-i>600){const S=l-i+1,w=t-i+1,P=Math.log(S),T=.5*Math.exp(2*P/3),D=.5*Math.sqrt(P*T*(S-T)/S)*(w-S/2<0?-1:1);$p(o,t,Math.max(i,Math.floor(t-w*T/S+D)),Math.min(l,Math.floor(t+(S-w)*T/S+D)),d)}const p=o[t];let g=i,y=l;for(rl(o,i,t),d(o[l],p)>0&&rl(o,i,l);g<y;){for(rl(o,g,y),g++,y--;d(o[g],p)<0;)g++;for(;d(o[y],p)>0;)y--}d(o[i],p)===0?rl(o,i,y):(y++,rl(o,y,l)),y<=t&&(i=y+1),t<=y&&(l=y-1)}}function rl(o,t,i){const l=o[t];o[t]=o[i],o[i]=l}function V0(o,t){return o<t?-1:o>t?1:0}function od(o,t){if(o.length<=1)return[o];const i=[];let l,d;for(const p of o){const g=$0(p);g!==0&&(p.area=Math.abs(g),d===void 0&&(d=g<0),d===g<0?(l&&i.push(l),l=[p]):l.push(p))}if(l&&i.push(l),t>1)for(let p=0;p<i.length;p++)i[p].length<=t||($p(i[p],t,1,i[p].length-1,U0),i[p]=i[p].slice(0,t));return i}function U0(o,t){return t.area-o.area}function $0(o){let t=0;for(let i,l,d=0,p=o.length,g=p-1;d<p;g=d++)i=o[d],l=o[g],t+=(l.x-i.x)*(i.y+l.y);return t}const Cc=1/298.257223563,qg=Cc*(2-Cc),Wg=Math.PI/180;class Gp{constructor(t){const i=6378.137*Wg*1e3,l=Math.cos(t*Wg),d=1/(1-qg*(1-l*l)),p=Math.sqrt(d);this.kx=i*p*l,this.ky=i*p*d*(1-qg)}distance(t,i){const l=this.wrap(t[0]-i[0])*this.kx,d=(t[1]-i[1])*this.ky;return Math.sqrt(l*l+d*d)}pointOnLine(t,i){let l,d,p,g,y=1/0;for(let S=0;S<t.length-1;S++){let w=t[S][0],P=t[S][1],T=this.wrap(t[S+1][0]-w)*this.kx,D=(t[S+1][1]-P)*this.ky,I=0;T===0&&D===0||(I=(this.wrap(i[0]-w)*this.kx*T+(i[1]-P)*this.ky*D)/(T*T+D*D),I>1?(w=t[S+1][0],P=t[S+1][1]):I>0&&(w+=T/this.kx*I,P+=D/this.ky*I)),T=this.wrap(i[0]-w)*this.kx,D=(i[1]-P)*this.ky;const N=T*T+D*D;N<y&&(y=N,l=w,d=P,p=S,g=I)}return{point:[l,d],index:p,t:Math.max(0,Math.min(1,g))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function Zg(o,t){return t[0]-o[0]}function nl(o){return o[1]-o[0]+1}function uo(o,t){return o[1]>=o[0]&&o[1]<t}function qp(o,t){if(o[0]>o[1])return[null,null];const i=nl(o);if(t){if(i===2)return[o,null];const d=Math.floor(i/2);return[[o[0],o[0]+d],[o[0]+d,o[1]]]}if(i===1)return[o,null];const l=Math.floor(i/2)-1;return[[o[0],o[0]+l],[o[0]+l+1,o[1]]]}function Wp(o,t){if(!uo(t,o.length))return[1/0,1/0,-1/0,-1/0];const i=[1/0,1/0,-1/0,-1/0];for(let l=t[0];l<=t[1];++l)Ys(i,o[l]);return i}function sd(o){const t=[1/0,1/0,-1/0,-1/0];for(const i of o)for(const l of i)Ys(t,l);return t}function Zp(o){return o[0]!==-1/0&&o[1]!==-1/0&&o[2]!==1/0&&o[3]!==1/0}function Hp(o,t,i){if(!Zp(o)||!Zp(t))return NaN;let l=0,d=0;return o[2]<t[0]&&(l=t[0]-o[2]),o[0]>t[2]&&(l=o[0]-t[2]),o[1]>t[3]&&(d=o[1]-t[3]),o[3]<t[1]&&(d=t[1]-o[3]),i.distance([0,0],[l,d])}function Js(o,t,i){const l=i.pointOnLine(t,o);return i.distance(o,l.point)}function Xp(o,t,i,l,d){const p=Math.min(Js(o,[i,l],d),Js(t,[i,l],d)),g=Math.min(Js(i,[o,t],d),Js(l,[o,t],d));return Math.min(p,g)}function Hg(o,t,i,l,d){if(!uo(t,o.length)||!uo(l,i.length))return 1/0;let p=1/0;for(let g=t[0];g<t[1];++g){const y=o[g],S=o[g+1];for(let w=l[0];w<l[1];++w){const P=i[w],T=i[w+1];if(nd(y,S,P,T))return 0;p=Math.min(p,Xp(y,S,P,T,d))}}return p}function G0(o,t,i,l,d){if(!uo(t,o.length)||!uo(l,i.length))return NaN;let p=1/0;for(let g=t[0];g<=t[1];++g)for(let y=l[0];y<=l[1];++y)if(p=Math.min(p,d.distance(o[g],i[y])),p===0)return p;return p}function q0(o,t,i){if(ko(o,t,!0))return 0;let l=1/0;for(const d of t){const p=d[0],g=d[d.length-1];if(p!==g&&(l=Math.min(l,Js(o,[g,p],i)),l===0))return l;const y=i.pointOnLine(d,o);if(l=Math.min(l,i.distance(o,y.point)),l===0)return l}return l}function W0(o,t,i,l){if(!uo(t,o.length))return NaN;for(let p=t[0];p<=t[1];++p)if(ko(o[p],i,!0))return 0;let d=1/0;for(let p=t[0];p<t[1];++p){const g=o[p],y=o[p+1];for(const S of i)for(let w=0,P=S.length,T=P-1;w<P;T=w++){const D=S[T],I=S[w];if(nd(g,y,D,I))return 0;d=Math.min(d,Xp(g,y,D,I,l))}}return d}function Xg(o,t){for(const i of o)for(const l of i)if(ko(l,t,!0))return!0;return!1}function Xt(o,t,i,l=1/0){const d=sd(o),p=sd(t);if(l!==1/0&&Hp(d,p,i)>=l)return l;if(Pc(d,p)){if(Xg(o,t))return 0}else if(Xg(t,o))return 0;let g=1/0;for(const y of o)for(let S=0,w=y.length,P=w-1;S<w;P=S++){const T=y[P],D=y[S];for(const I of t)for(let N=0,B=I.length,q=B-1;N<B;q=N++){const W=I[q],ee=I[N];if(nd(T,D,W,ee))return 0;g=Math.min(g,Xp(T,D,W,ee,i))}}return g}function Kg(o,t,i,l,d,p){if(!p)return;const g=Hp(Wp(l,p),d,i);g<t&&o.push([g,p,[0,0]])}function ad(o,t,i,l,d,p,g){if(!p||!g)return;const y=Hp(Wp(l,p),Wp(d,g),i);y<t&&o.push([y,p,g])}function ld(o,t,i,l,d=1/0){let p=Math.min(l.distance(o[0],i[0][0]),d);if(p===0)return p;const g=new Up([[0,[0,o.length-1],[0,0]]],Zg),y=sd(i);for(;g.length>0;){const S=g.pop();if(S[0]>=p)continue;const w=S[1],P=t?50:100;if(nl(w)<=P){if(!uo(w,o.length))return NaN;if(t){const T=W0(o,w,i,l);if(isNaN(T)||T===0)return T;p=Math.min(p,T)}else for(let T=w[0];T<=w[1];++T){const D=q0(o[T],i,l);if(p=Math.min(p,D),p===0)return 0}}else{const T=qp(w,t);Kg(g,p,l,o,y,T[0]),Kg(g,p,l,o,y,T[1])}}return p}function cd(o,t,i,l,d,p=1/0){let g=Math.min(p,d.distance(o[0],i[0]));if(g===0)return g;const y=new Up([[0,[0,o.length-1],[0,i.length-1]]],Zg);for(;y.length>0;){const S=y.pop();if(S[0]>=g)continue;const w=S[1],P=S[2],T=t?50:100,D=l?50:100;if(nl(w)<=T&&nl(P)<=D){if(!uo(w,o.length)&&uo(P,i.length))return NaN;let I;if(t&&l)I=Hg(o,w,i,P,d),g=Math.min(g,I);else if(t&&!l){const N=o.slice(w[0],w[1]+1);for(let B=P[0];B<=P[1];++B)if(I=Js(i[B],N,d),g=Math.min(g,I),g===0)return g}else if(!t&&l){const N=i.slice(P[0],P[1]+1);for(let B=w[0];B<=w[1];++B)if(I=Js(o[B],N,d),g=Math.min(g,I),g===0)return g}else I=G0(o,w,i,P,d),g=Math.min(g,I)}else{const I=qp(w,t),N=qp(P,l);ad(y,g,d,o,i,I[0],N[0]),ad(y,g,d,o,i,I[0],N[1]),ad(y,g,d,o,i,I[1],N[0]),ad(y,g,d,o,i,I[1],N[1])}}return g}function Kp(o){return o.type==="MultiPolygon"?o.coordinates.map(t=>({type:"Polygon",coordinates:t})):o.type==="MultiLineString"?o.coordinates.map(t=>({type:"LineString",coordinates:t})):o.type==="MultiPoint"?o.coordinates.map(t=>({type:"Point",coordinates:t})):[o]}class ea{constructor(t,i){this.type=at,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(cs(t[1])){const l=t[1];if(l.type==="FeatureCollection")return new ea(l,l.features.map(d=>Kp(d.geometry)).flat());if(l.type==="Feature")return new ea(l,Kp(l.geometry));if("type"in l&&"coordinates"in l)return new ea(l,Kp(l))}return i.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,l){const d=i.geometry(),p=d.flat().map(S=>Bp([S.x,S.y],i.canonical));if(d.length===0)return NaN;const g=new Gp(p[0][1]);let y=1/0;for(const S of l){switch(S.type){case"Point":y=Math.min(y,cd(p,!1,[S.coordinates],!1,g,y));break;case"LineString":y=Math.min(y,cd(p,!1,S.coordinates,!0,g,y));break;case"Polygon":y=Math.min(y,ld(p,!1,S.coordinates,g,y))}if(y===0)return y}return y}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,l){const d=i.geometry(),p=d.flat().map(S=>Bp([S.x,S.y],i.canonical));if(d.length===0)return NaN;const g=new Gp(p[0][1]);let y=1/0;for(const S of l){switch(S.type){case"Point":y=Math.min(y,cd(p,!0,[S.coordinates],!1,g,y));break;case"LineString":y=Math.min(y,cd(p,!0,S.coordinates,!0,g,y));break;case"Polygon":y=Math.min(y,ld(p,!0,S.coordinates,g,y))}if(y===0)return y}return y}(t,this.geometries);if(t.geometryType()==="Polygon")return function(i,l){const d=i.geometry();if(d.length===0||d[0].length===0)return NaN;const p=od(d,0).map(S=>S.map(w=>w.map(P=>Bp([P.x,P.y],i.canonical)))),g=new Gp(p[0][0][0][1]);let y=1/0;for(const S of l)for(const w of p){switch(S.type){case"Point":y=Math.min(y,ld([S.coordinates],!1,w,g,y));break;case"LineString":y=Math.min(y,ld(S.coordinates,!0,w,g,y));break;case"Polygon":y=Math.min(y,Xt(w,S.coordinates,g,y))}if(y===0)return y}return y}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Ic{constructor(t){this.type=Mt,this.key=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const l=t[1];return l==null?i.error("Global state property must be defined."):typeof l!="string"?i.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new Ic(l)}evaluate(t){var i;const l=(i=t.globals)===null||i===void 0?void 0:i.globalState;
457return l&&Object.keys(l).length!==0?wc(l,this.key):null}eachChild(){}outputDefined(){return!1}}const il={"==":jp,"!=":jg,">":el,"<":F0,">=":Np,"<=":Ju,array:Kn,at:Nt,boolean:Kn,case:$i,coalesce:Tc,collator:ed,format:Ks,image:tl,in:At,"index-of":Ya,interpolate:Dr,"interpolate-hcl":Dr,"interpolate-lab":Dr,length:li,let:ir,literal:co,match:Bt,number:Kn,"number-format":td,object:Kn,slice:Qa,step:Ja,string:Kn,"to-boolean":Ro,"to-color":Ro,"to-number":Ro,"to-string":Ro,var:Ka,within:Qs,distance:ea,"global-state":Ic};class Si{constructor(t,i,l,d){this.name=t,this.type=i,this._evaluate=l,this.args=d}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,i){const l=t[0],d=Si.definitions[l];if(!d)return i.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0);const p=Array.isArray(d)?d[0]:d.type,g=Array.isArray(d)?[[d[1],d[2]]]:d.overloads,y=g.filter(([w])=>!Array.isArray(w)||w.length===t.length-1);let S=null;for(const[w,P]of y){S=new Zs(i.registry,ud,i.path,null,i.scope);const T=[];let D=!1;for(let I=1;I<t.length;I++){const N=t[I],B=Array.isArray(w)?w[I-1]:w.type,q=S.parse(N,1+T.length,B);if(!q){D=!0;break}T.push(q)}if(!D)if(Array.isArray(w)&&w.length!==T.length)S.error(`Expected ${w.length} arguments, but found ${T.length} instead.`);else{for(let I=0;I<T.length;I++){const N=Array.isArray(w)?w[I]:w.type,B=T[I];S.concat(I+1).checkSubtype(N,B.type)}if(S.errors.length===0)return new Si(l,p,P,T)}}if(y.length===1)i.errors.push(...S.errors);else{const w=(y.length?y:g).map(([T])=>{return D=T,Array.isArray(D)?`(${D.map(Jt).join(", ")})`:`(${Jt(D.type)}...)`;var D}).join(" | "),P=[];for(let T=1;T<t.length;T++){const D=i.parse(t[T],1+P.length);if(!D)return null;P.push(Jt(D.type))}i.error(`Expected arguments of type ${w}, but found (${P.join(", ")}) instead.`)}return null}static register(t,i){Si.definitions=i;for(const l in i)t[l]=Si}}function Yg(o,[t,i,l,d]){t=t.evaluate(o),i=i.evaluate(o),l=l.evaluate(o);const p=d?d.evaluate(o):1,g=Xa(t,i,l,p);if(g)throw new nr(g);return new Rt(t/255,i/255,l/255,p,!1)}function Qg(o,t){return o in t}function Yp(o,t){const i=t[o];return i===void 0?null:i}function ta(o){return{type:o}}function ud(o){if(o instanceof Ka)return ud(o.boundExpression);if(o instanceof Si&&o.name==="error"||o instanceof ed||o instanceof Qs||o instanceof ea||o instanceof Ic)return!1;const t=o instanceof Ro||o instanceof Kn;let i=!0;return o.eachChild(l=>{i=t?i&&ud(l):i&&l instanceof co}),!!i&&dd(o)&&hd(o,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function dd(o){if(o instanceof Si&&(o.name==="get"&&o.args.length===1||o.name==="feature-state"||o.name==="has"&&o.args.length===1||o.name==="properties"||o.name==="geometry-type"||o.name==="id"||/^filter-/.test(o.name))||o instanceof Qs||o instanceof ea)return!1;let t=!0;return o.eachChild(i=>{t&&!dd(i)&&(t=!1)}),t}
457function Mc(o){if(o instanceof Si&&o.name==="feature-state")return!1;let t=!0;return o.eachChild(i=>{t&&!Mc(i)&&(t=!1)}),t}function hd(o,t){if(o instanceof Si&&t.indexOf(o.name)>=0)return!1;let i=!0;return o.eachChild(l=>{i&&!hd(l,t)&&(i=!1)}),i}function Jg(o){return{result:"success",value:o}}function ol(o){return{result:"error",value:o}}function sl(o){return o["property-type"]==="data-driven"||o["property-type"]==="cross-faded-data-driven"}function ey(o){return!!o.expression&&o.expression.parameters.indexOf("zoom")>-1}function Qp(o){return!!o.expression&&o.expression.interpolated}function Lt(o){return o instanceof Number?"number":o instanceof String?"string":o instanceof Boolean?"boolean":Array.isArray(o)?"array":o===null?"null":typeof o}function pd(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&Mr(o)===Ao}function Z0(o){return o}function ty(o,t){const i=o.stops&&typeof o.stops[0][0]=="object",l=i||!(i||o.property!==void 0),d=o.type||(Qp(t)?"exponential":"interval"),p=function(P){switch(P.type){case"color":return Rt.parse;case"padding":return wn.parse;case"numberArray":return gr.parse;case"colorArray":return Et.parse;default:return null}}(t);if(p&&((o=Us({},o)).stops&&(o.stops=o.stops.map(P=>[P[0],p(P[1])])),o.default=p(o.default?o.default:t.default)),o.colorSpace&&(g=o.colorSpace)!=="rgb"&&g!=="hcl"&&g!=="lab")throw new Error(`Unknown color space: "${o.colorSpace}"`);var g;const y=function(P){switch(P){case"exponential":return ry;case"interval":return X0;case"categorical":return H0;case"identity":return K0;default:throw new Error(`Unknown function type "${P}"`)}}(d);let S,w;if(d==="categorical"){S=Object.create(null);for(const P of o.stops)S[P[0]]=P[1];w=typeof o.stops[0][0]}if(i){const P={},T=[];for(let N=0;N<o.stops.length;
457N++){const B=o.stops[N],q=B[0].zoom;P[q]===void 0&&(P[q]={zoom:q,type:o.type,property:o.property,default:o.default,stops:[]},T.push(q)),P[q].stops.push([B[0].value,B[1]])}const D=[];for(const N of T)D.push([P[N].zoom,ty(P[N],t)]);const I={name:"linear"};return{kind:"composite",interpolationType:I,interpolationFactor:Dr.interpolationFactor.bind(void 0,I),zoomStops:D.map(N=>N[0]),evaluate:({zoom:N},B)=>ry({stops:D,base:o.base},t,N).evaluate(N,B)}}if(l){const P=d==="exponential"?{name:"exponential",base:o.base!==void 0?o.base:1}:null;return{kind:"camera",interpolationType:P,interpolationFactor:Dr.interpolationFactor.bind(void 0,P),zoomStops:o.stops.map(T=>T[0]),evaluate:({zoom:T})=>y(o,t,T,S,w)}}return{kind:"source",evaluate(P,T){const D=T&&T.properties?T.properties[o.property]:void 0;return D===void 0?Ac(o.default,t.default):y(o,t,D,S,w)}}}function Ac(o,t,i){return o!==void 0?o:t!==void 0?t:i!==void 0?i:void 0}function H0(o,t,i,l,d){return Ac(typeof i===d?l[i]:void 0,o.default,t.default)}function X0(o,t,i){if(Lt(i)!=="number")return Ac(o.default,t.default);const l=o.stops.length;if(l===1||i<=o.stops[0][0])return o.stops[0][1];if(i>=o.stops[l-1][0])return o.stops[l-1][1];const d=Hs(o.stops.map(p=>p[0]),i);return o.stops[d][1]}function ry(o,t,i){const l=o.base!==void 0?o.base:1;if(Lt(i)!=="number")return Ac(o.default,t.default);const d=o.stops.length;if(d===1||i<=o.stops[0][0])return o.stops[0][1];if(i>=o.stops[d-1][0])return o.stops[d-1][1];const p=Hs(o.stops.map(P=>P[0]),i),g=function(P,T,D,I){const N=I-D,B=P-D;return N===0?0:T===1?B/N:(Math.pow(T,B)-1)/(Math.pow(T,N)-1)}(i,l,o.stops[p][0],o.stops[p+1][0]),y=o.stops[p][1],S=o.stops[p+1][1],w=ai[t.type]||Z0;return typeof y.evaluate=="function"?{evaluate(...P){const T=y.evaluate.apply(void 0,P),D=S.evaluate.apply(void 0,P);
vendor: 4,228 bytes, line 457
457if(T!==void 0&&D!==void 0)return w(T,D,g,o.colorSpace)}}:w(y,S,g,o.colorSpace)}function K0(o,t,i){switch(t.type){case"color":i=Rt.parse(i);break;case"formatted":i=Xn.fromString(i.toString());break;case"resolvedImage":i=si.fromString(i.toString());break;case"padding":i=wn.parse(i);break;case"colorArray":i=Et.parse(i);break;case"numberArray":i=gr.parse(i);break;default:Lt(i)===t.type||t.type==="enum"&&t.values[i]||(i=void 0)}return Ac(i,o.default,t.default)}Si.register(il,{error:[{kind:"error"},[It],(o,[t])=>{throw new nr(t.evaluate(o))}],typeof:[It,[Mt],(o,[t])=>Jt(Mr(t.evaluate(o)))],"to-rgba":[dn(at,4),[oi],(o,[t])=>{const[i,l,d,p]=t.evaluate(o).rgb;return[255*i,255*l,255*d,p]}],rgb:[oi,[at,at,at],Yg],rgba:[oi,[at,at,at,at],Yg],has:{type:Dt,overloads:[[[It],(o,[t])=>Qg(t.evaluate(o),o.properties())],[[It,Ao],(o,[t,i])=>Qg(t.evaluate(o),i.evaluate(o))]]},get:{type:Mt,overloads:[[[It],(o,[t])=>Yp(t.evaluate(o),o.properties())],[[It,Ao],(o,[t,i])=>Yp(t.evaluate(o),i.evaluate(o))]]},"feature-state":[Mt,[It],(o,[t])=>Yp(t.evaluate(o),o.featureState||{})],properties:[Ao,[],o=>o.properties()],"geometry-type":[It,[],o=>o.geometryType()],id:[Mt,[],o=>o.id()],zoom:[at,[],o=>o.globals.zoom],"heatmap-density":[at,[],o=>o.globals.heatmapDensity||0],elevation:[at,[],o=>o.globals.elevation||0],"line-progress":[at,[],o=>o.globals.lineProgress||0],accumulated:[Mt,[],o=>o.globals.accumulated===void 0?null:o.globals.accumulated],"+":[at,ta(at),(o,t)=>{let i=0;for(const l of t)i+=l.evaluate(o);return i}],"*":[at,ta(at),(o,t)=>{let i=1;for(const l of t)i*=l.evaluate(o);return i}],"-":{type:at,overloads:[[[at,at],(o,[t,i])=>t.evaluate(o)-i.evaluate(o)],[[at],(o,[t])=>-t.evaluate(o)]]},"/":[at,[at,at],(o,[t,i])=>t.evaluate(o)/i.evaluate(o)],"%":[at,[at,at],(o,[t,i])=>t.evaluate(o)%i.evaluate(o)],ln2:[at,[],()=>Math.LN2],pi:[at,[],()=>Math.PI],e:[at,[],()=>Math.E],"^":[at,[at,at],(o,[t,i])=>Math.pow(t.evaluate(o),i.evaluate(o))],sqrt:[at,[at],(o,[t])=>Math.sqrt(t.evaluate(o))],log10:[at,[at],(o,[t])=>Math.log(t.evaluate(o))/Math.LN10],ln:[at,[at],(o,[t])=>Math.log(t.evaluate(o))],log2:[at,[at],(o,[t])=>Math.log(t.evaluate(o))/Math.LN2],sin:[at,[at],(o,[t])=>Math.sin(t.evaluate(o))],cos:[at,[at],(o,[t])=>Math.cos(t.evaluate(o))],tan:[at,[at],(o,[t])=>Math.tan(t.evaluate(o))],asin:[at,[at],(o,[t])=>Math.asin(t.evaluate(o))],acos:[at,[at],(o,[t])=>Math.acos(t.evaluate(o))],atan:[at,[at],(o,[t])=>Math.atan(t.evaluate(o))],min:[at,ta(at),(o,t)=>Math.min(...t.map(i=>i.evaluate(o)))],max:[at,ta(at),(o,t)=>Math.max(...t.map(i=>i.evaluate(o)))],abs:[at,[at],(o,[t])=>Math.abs(t.evaluate(o))],round:[at,[at],(o,[t])=>{const i=t.evaluate(o);return i<0?-Math.round(-i):Math.round(i)}],floor:[at,[at],(o,[t])=>Math.floor(t.evaluate(o))],ceil:[at,[at],(o,[t])=>Math.ceil(t.evaluate(o))],"filter-==":[Dt,[It,Mt],(o,[t,i])=>o.properties()[t.value]===i.value],"filter-id-==":[Dt,[Mt],(o,[t])=>o.id()===t.value],"filter-type-==":[Dt,[It],(o,[t])=>o.geometryType()===t.value],"filter-<":[Dt,[It,Mt],(o,[t,i])=>{const l=o.properties()[t.value],d=i.value;return typeof l==typeof d&&l<d}],"filter-id-<":[Dt,[Mt],(o,[t])=>{const i=o.id(),l=t.value;return typeof i==typeof l&&i<l}],"filter->":[Dt,[It,Mt],(o,[t,i])=>{const l=o.properties()[t.value],d=i.value;return typeof l==typeof d&&l>d}],"filter-id->":[Dt,[Mt],(o,[t])=>{const i=o.id(),l=t.value;return typeof i==typeof l&&i>l}],"filter-<=":[Dt,[It,Mt],(o,[t,i])=>{const l=o.properties()[t.value],d=i.value;return typeof l==typeof d&&l<=d}],"filter-id-<=":[Dt,[Mt],(o,[t])=>{const i=o.id(),l=t.value;return typeof i==typeof l&&i<=l}],"filter->=":[Dt,[It,Mt],(o,[t,i])=>{const l=o.properties()[t.value],d=i.value;return typeof l==typeof d&&l>=d}],"filter-id->=":[Dt,[Mt],(o,[t])=>{const i=o.id(),l=t.value;return typeof i==typeof l&&i>=l}],"filter-has":[Dt,[Mt],(o,[t])=>t.value in o.properties()],"filter-has-id":[Dt,[],o=>o.id()!==null&&o.id()!==void 0],"filter-type-in":[Dt,[dn(It)],(o,[t])=>t.value.indexOf(o.geometryType())>=0],"filter-id-in":[Dt,[dn(Mt)],(o,[t])=>t.value.indexOf(o.id())>=0],"filter-in-small":[Dt,[It,dn(Mt)],(o,[t,i])=>i.value.indexOf(o.properties()[t.value])>=0],"filter-in-large":[Dt,[It,dn(Mt)],(o,[t,i])=>function(l,d,p,g){for(;p<=g;){const y=p+g>>
vendor: 2,424 bytes, line 457
4571;if(d[y]===l)return!0;d[y]>l?g=y-1:p=y+1}return!1}(o.properties()[t.value],i.value,0,i.value.length-1)],all:{type:Dt,overloads:[[[Dt,Dt],(o,[t,i])=>t.evaluate(o)&&i.evaluate(o)],[ta(Dt),(o,t)=>{for(const i of t)if(!i.evaluate(o))return!1;return!0}]]},any:{type:Dt,overloads:[[[Dt,Dt],(o,[t,i])=>t.evaluate(o)||i.evaluate(o)],[ta(Dt),(o,t)=>{for(const i of t)if(i.evaluate(o))return!0;return!1}]]},"!":[Dt,[Dt],(o,[t])=>!t.evaluate(o)],"is-supported-script":[Dt,[It],(o,[t])=>{const i=o.globals&&o.globals.isSupportedScript;return!i||i(t.evaluate(o))}],upcase:[It,[It],(o,[t])=>t.evaluate(o).toUpperCase()],downcase:[It,[It],(o,[t])=>t.evaluate(o).toLowerCase()],concat:[It,ta(Mt),(o,t)=>t.map(i=>qs(i.evaluate(o))).join("")],split:[dn(It),[It,It],(o,[t,i])=>t.evaluate(o).split(i.evaluate(o))],join:[It,[dn(It),It],(o,[t,i])=>t.evaluate(o).join(i.evaluate(o))],"resolved-locale":[It,[gc],(o,[t])=>t.evaluate(o).resolvedLocale()]});class Rc{constructor(t,i,l){this.expression=t,this._warningHistory={},this._evaluator=new Op,this._defaultValue=i?function(d){if(d.type==="color"&&pd(d.default))return new Rt(0,0,0,0);switch(d.type){case"color":return Rt.parse(d.default)||null;case"padding":return wn.parse(d.default)||null;case"numberArray":return gr.parse(d.default)||null;case"colorArray":return Et.parse(d.default)||null;case"variableAnchorOffsetCollection":return zn.parse(d.default)||null;case"projectionDefinition":return On.parse(d.default)||null;default:return d.default===void 0?null:d.default}}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null,this._globalState=l}evaluateWithoutErrorHandling(t,i,l,d,p,g){return this._globalState&&(t=ll(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=i,this._evaluator.featureState=l,this._evaluator.canonical=d,this._evaluator.availableImages=p||null,this._evaluator.formattedSection=g,this.expression.evaluate(this._evaluator)}evaluate(t,i,l,d,p,g){this._globalState&&(t=ll(t,this._globalState)),this._evaluator.globals=t,this._evaluator.feature=i||null,this._evaluator.featureState=l||null,this._evaluator.canonical=d,this._evaluator.availableImages=p||null,this._evaluator.formattedSection=g||null;try{const y=this.expression.evaluate(this._evaluator);if(y==null||typeof y=="number"&&y!=y)return this._defaultValue;if(this._enumValues&&!(y in this._enumValues))throw new nr(`Expected value to be one of ${Object.keys(this._enumValues).map(S=>
457JSON.stringify(S)).join(", ")}, but found ${JSON.stringify(y)} instead.`);return y}catch(y){return this._warningHistory[y.message]||(this._warningHistory[y.message]=!0,typeof console<"u"&&console.warn(y.message)),this._defaultValue}}}function fd(o){return Array.isArray(o)&&o.length>0&&typeof o[0]=="string"&&o[0]in il}function kc(o,t,i){const l=new Zs(il,ud,[],t?function(p){const g={color:oi,string:It,number:at,enum:It,boolean:Dt,formatted:yc,padding:Wu,numberArray:_c,colorArray:Ga,projectionDefinition:qu,resolvedImage:qa,variableAnchorOffsetCollection:vc};return p.type==="array"?dn(g[p.value]||Mt,p.length):g[p.type]}(t):void 0),d=l.parse(o,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return d?Jg(new Rc(d,t,i)):ol(l.errors)}class md{constructor(t,i,l){this.kind=t,this._styleExpression=i,this.isStateDependent=t!=="constant"&&!Mc(i.expression),this.globalStateRefs=al(i.expression),this._globalState=l}evaluateWithoutErrorHandling(t,i,l,d,p,g){return this._globalState&&(t=ll(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,i,l,d,p,g)}evaluate(t,i,l,d,p,g){return this._globalState&&(t=ll(t,this._globalState)),this._styleExpression.evaluate(t,i,l,d,p,g)}}class gd{constructor(t,i,l,d,p){this.kind=t,this.zoomStops=l,this._styleExpression=i,this.isStateDependent=t!=="camera"&&!Mc(i.expression),this.globalStateRefs=al(i.expression),this.interpolationType=d,this._globalState=p}evaluateWithoutErrorHandling(t,i,l,d,p,g){return this._globalState&&(t=ll(t,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(t,i,l,d,p,g)}evaluate(t,i,l,d,p,g){return this._globalState&&(t=ll(t,this._globalState)),this._styleExpression.evaluate(t,i,l,d,p,g)}interpolationFactor(t,i,l){return this.interpolationType?Dr.interpolationFactor(this.interpolationType,t,i,l):0}}function ny(o,t,i){const l=kc(o,t,i);if(l.result==="error")return l;const d=l.value.expression,p=dd(d);if(!p&&!sl(t))return ol([new un("","data expressions not supported")]);const g=hd(d,["zoom"]);if(!g&&!ey(t))return ol([new un("","zoom expressions not supported")]);const y=ra(d);return y||g?y instanceof un?ol([y]):y instanceof Dr&&!Qp(t)?ol([new un("",'"interpolate" expressions cannot be used with this property')]):Jg(y?new gd(p?"camera":"composite",l.value,y.labels,y instanceof Dr?y.interpolation:void 0,i):new md(p?"constant":"source",l.value,i)):ol([new un("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class yd{constructor(t,i){this._parameters=t,this._specification=i,Us(this,ty(this._parameters,this._specification))}static deserialize(t){return new yd(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function ra(o){let t=null;if(o instanceof ir)t=ra(o.result);else if(o instanceof Tc){for(const i of o.args)if(t=ra(i),t)break}else(o instanceof Ja||o instanceof Dr)&&o.input instanceof Si&&o.input.name==="zoom"&&(t=o);return t instanceof un||o.eachChild(i=>{const l=ra(i);l instanceof un?t=l:!t&&l?t=new un("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&l&&t!==l&&(t=new un("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function al(o,t=new Set){return o instanceof Ic&&t.add(o.key),o.eachChild(i=>{al(i,t)}),t}function ll(o,t){const{zoom:i,heatmapDensity:l,elevation:d,lineProgress:p,isSupportedScript:g,accumulated:y}=o??{};return{zoom:i,heatmapDensity:l,elevation:d,lineProgress:p,isSupportedScript:g,accumulated:y,globalState:t}}function Jp(o){if(o===!0||o===!1)return!0;if(!Array.isArray(o)||o.length===0)return!1;switch(o[0]){case"has":return o.length>=2&&o[1]!=="$id"&&o[1]!=="$type";case"in":return o.length>
vendor: 9,268 bytes, line 457
457=3&&(typeof o[1]!="string"||Array.isArray(o[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return o.length!==3||Array.isArray(o[1])||Array.isArray(o[2]);case"any":case"all":for(const t of o.slice(1))if(!Jp(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const Y0={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Dc(o,t){if(o==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Jp(o)||(o=Lc(o));const i=kc(o,Y0,t);if(i.result==="error")throw new Error(i.value.map(l=>`${l.key}: ${l.message}`).join(", "));return{filter:(l,d,p)=>i.value.evaluate(l,d,{},p),needGeometry:ef(o),getGlobalStateRefs:()=>al(i.value.expression)}}function Q0(o,t){return o<t?-1:o>t?1:0}function ef(o){if(!Array.isArray(o))return!1;if(o[0]==="within"||o[0]==="distance")return!0;for(let t=1;t<o.length;t++)if(ef(o[t]))return!0;return!1}function Lc(o){if(!o)return!0;const t=o[0];return o.length<=1?t!=="any":t==="=="?tf(o[1],o[2],"=="):t==="!="?zc(tf(o[1],o[2],"==")):t==="<"||t===">"||t==="<="||t===">="?tf(o[1],o[2],t):t==="any"?(i=o.slice(1),["any"].concat(i.map(Lc))):t==="all"?["all"].concat(o.slice(1).map(Lc)):t==="none"?["all"].concat(o.slice(1).map(Lc).map(zc)):t==="in"?iy(o[1],o.slice(2)):t==="!in"?zc(iy(o[1],o.slice(2))):t==="has"?rf(o[1]):t!=="!has"||zc(rf(o[1]));var i}function tf(o,t,i){switch(o){case"$type":return[`filter-type-${i}`,t];case"$id":return[`filter-id-${i}`,t];default:return[`filter-${i}`,o,t]}}function iy(o,t){if(t.length===0)return!1;switch(o){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(i=>typeof i!=typeof t[0])?["filter-in-large",o,["literal",t.sort(Q0)]]:["filter-in-small",o,["literal",t]]}}function rf(o){switch(o){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",o]}}function zc(o){return["!",o]}function _d(o){const t=typeof o;if(t==="number"||t==="boolean"||t==="string"||o==null)return JSON.stringify(o);if(Array.isArray(o)){let d="[";for(const p of o)d+=`${_d(p)},`;return`${d}]`}const i=Object.keys(o).sort();let l="{";for(let d=0;d<i.length;d++)l+=`${JSON.stringify(i[d])}:${_d(o[i[d]])},`;return`${l}}`}function J0(o){let t="";for(const i of Ep)t+=`/${_d(o[i])}`;return t}function oy(o){const t=o.value;return t?[new et(o.key,t,"constants have been deprecated as of v8")]:[]}function Ar(o){return o instanceof Number||o instanceof String||o instanceof Boolean?o.valueOf():o}function na(o){if(Array.isArray(o))return o.map(na);if(o instanceof Object&&!(o instanceof Number||o instanceof String||o instanceof Boolean)){const t={};for(const i in o)t[i]=na(o[i]);return t}return Ar(o)}function Yn(o){const t=o.key,i=o.value,l=o.valueSpec||{},d=o.objectElementValidators||{},p=o.style,g=o.styleSpec,y=o.validateSpec;let S=[];const w=Lt(i);if(w!=="object")return[new et(t,i,`object expected, ${w} found`)];for(const P in i){const T=P.split(".")[0],D=wc(l,T)||l["*"];let I;if(wc(d,T))I=d[T];else if(wc(l,T)){if(i[P]===void 0)continue;I=y}else if(d["*"])I=d["*"];else{if(!l["*"]){S.push(new et(t,i[P],`unknown property "${P}"`));continue}I=y}S=S.concat(I({key:(t&&`${t}.`)+P,value:i[P],valueSpec:D,style:p,styleSpec:g,object:i,objectKey:P,validateSpec:y},i))}for(const P in l)d[P]||l[P].required&&l[P].default===void 0&&i[P]===void 0&&S.push(new et(t,i,`missing required property "${P}"`));return S}function vd(o){const t=o.value,i=o.valueSpec,l=o.style,d=o.styleSpec,p=o.key,g=o.arrayElementValidator||o.validateSpec;if(Lt(t)!=="array")return[new et(p,t,`array expected, ${Lt(t)} found`)];if(i.length&&t.length!==i.length)return[new et(p,t,`array length ${i.length} expected, length ${t.length} found`)];let y={type:i.value,values:i.values};d.$version<7&&(y.function=i.function),Lt(i.value)==="object"&&(y=i.value);let S=[];for(let w=0;w<t.length;w++)S=S.concat(g({array:t,arrayIndex:w,value:t[w],valueSpec:y,validateSpec:o.validateSpec,style:l,styleSpec:d,key:`${p}[${w}]`}));return S}function cl(o){const t=o.key,i=o.value,l=o.valueSpec;let d=Lt(i);return d==="number"&&i!=i&&(d="NaN"),d!=="number"?[new et(t,i,`number expected, ${d} found`)]:"minimum"in l&&i<l.minimum?[new et(t,i,`${i} is less than the minimum value ${l.minimum}`)]:"maximum"in l&&i>l.maximum?[new et(t,i,`${i} is greater than the maximum value ${l.maximum}`)]:[]}function xd(o){const t=o.valueSpec,i=Ar(o.value.type);let l,d,p,g={};const y=i!=="categorical"&&o.value.property===void 0,S=!y,w=Lt(o.value.stops)==="array"&&Lt(o.value.stops[0])==="array"&&Lt(o.value.stops[0][0])==="object",P=Yn({key:o.key,value:o.value,valueSpec:o.styleSpec.function,validateSpec:o.validateSpec,style:o.style,styleSpec:o.styleSpec,objectElementValidators:{stops:function(I){if(i==="identity")return[new et(I.key,I.value,'identity function may not have a "stops" property')];let N=[];const B=I.value;return N=N.concat(vd({key:I.key,value:B,valueSpec:I.valueSpec,validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec,arrayElementValidator:T})),Lt(B)==="array"&&B.length===0&&N.push(new et(I.key,B,"array must have at least one stop")),N},default:function(I){return I.validateSpec({key:I.key,value:I.value,valueSpec:t,validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec})}}});return i==="identity"&&y&&P.push(new et(o.key,o.value,'missing required property "property"')),i==="identity"||o.value.stops||P.push(new et(o.key,o.value,'missing required property "stops"')),i==="exponential"&&o.valueSpec.expression&&!Qp(o.valueSpec)&&P.push(new et(o.key,o.value,"exponential functions not supported")),o.styleSpec.$version>=8&&(S&&!sl(o.valueSpec)?P.push(new et(o.key,o.value,"property functions not supported")):y&&!ey(o.valueSpec)&&P.push(new et(o.key,o.value,"zoom functions not supported"))),i!=="categorical"&&!w||o.value.property!==void 0||P.push(new et(o.key,o.value,'"property" property is required')),P;function T(I){let N=[];const B=I.value,q=I.key;if(Lt(B)!=="array")return[new et(q,B,`array expected, ${Lt(B)} found`)];if(B.length!==2)return[new et(q,B,`array length 2 expected, length ${B.length} found`)];if(w){if(Lt(B[0])!=="object")return[new et(q,B,`object expected, ${Lt(B[0])} found`)];if(B[0].zoom===void 0)return[new et(q,B,"object stop key must have zoom")];if(B[0].value===void 0)return[new et(q,B,"object stop key must have value")];if(p&&p>Ar(B[0].zoom))return[new et(q,B[0].zoom,"stop zoom values must appear in ascending order")];Ar(B[0].zoom)!==p&&(p=Ar(B[0].zoom),d=void 0,g={}),N=N.concat(Yn({key:`${q}[0]`,value:B[0],valueSpec:{zoom:{}},validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec,objectElementValidators:{zoom:cl,value:D}}))}else N=N.concat(D({key:`${q}[0]`,value:B[0],validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec},B));return fd(na(B[1]))?N.concat([new et(`${q}[1]`,B[1],"expressions are not allowed in function stops.")]):N.concat(I.validateSpec({key:`${q}[1]`,value:B[1],valueSpec:t,validateSpec:I.validateSpec,style:I.style,styleSpec:I.styleSpec}))}function D(I,N){const B=Lt(I.value),q=Ar(I.value),W=I.value!==null?I.value:N;if(l){if(B!==l)return[new et(I.key,W,`${B} stop domain type must match previous stop domain type ${l}`)]}else l=B;if(B!=="number"&&B!=="string"&&B!=="boolean")return[new et(I.key,W,"stop domain value must be a number, string, or boolean")];if(B!=="number"&&i!=="categorical"){let ee=`number expected, ${B} found`;return sl(t)&&i===void 0&&(ee+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new et(I.key,W,ee)]}return i!=="categorical"||B!=="number"||isFinite(q)&&Math.floor(q)===q?i!=="categorical"&&B==="number"&&d!==void 0&&q<d?[new et(I.key,W,"stop domain values must appear in ascending order")]:(d=q,i==="categorical"&&q in g?[new et(I.key,W,"stop domain values must be unique")]:(g[q]=!0,[])):[new et(I.key,W,`integer expected, found ${q}`)]}}function us(o){const t=(o.expressionContext==="property"?ny:kc)(na(o.value),o.valueSpec);if(t.result==="error")return t.value.map(l=>new et(`${o.key}${l.key}`,o.value,l.message));const i=t.value.expression||t.value._styleExpression.expression;if(o.expressionContext==="property"&&o.propertyKey==="text-font"&&!i.outputDefined())return[new et(o.key,o.value,`Invalid data expression for "${o.propertyKey}". Output values must be contained as literals within the expression.`)];if(o.expressionContext==="property"&&o.propertyType==="layout"&&!Mc(i))return[new et(o.key,o.value,'"feature-state" data expressions are not supported with layout properties.')];if(o.expressionContext==="filter"&&!Mc(i))return[new et(o.key,o.value,'"feature-state" data expressions are not supported with filters.')];if(o.expressionContext&&o.expressionContext.indexOf("cluster")===0){if(!hd(i,["zoom","feature-state"]))return[new et(o.key,o.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(o.expressionContext==="cluster-initial"&&!dd(i))return[new et(o.key,o.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Oc(o){const t=o.key,i=o.value,l=Lt(i);return l!=="string"?[new et(t,i,`color expected, ${l}
457 found`)]:Rt.parse(String(i))?[]:[new et(t,i,`color expected, "${i}" found`)]}function ia(o){const t=o.key,i=o.value,l=o.valueSpec,d=[];return Array.isArray(l.values)?l.values.indexOf(Ar(i))===-1&&d.push(new et(t,i,`expected one of [${l.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(l.values).indexOf(Ar(i))===-1&&d.push(new et(t,i,`expected one of [${Object.keys(l.values).join(", ")}], ${JSON.stringify(i)} found`)),d}function ul(o){return Jp(na(o.value))?us(Us({},o,{expressionContext:"filter",valueSpec:{value:"boolean"}})):sy(o)}function sy(o){const t=o.value,i=o.key;if(Lt(t)!=="array")return[new et(i,t,`array expected, ${Lt(t)} found`)];const l=o.styleSpec;let d,p=[];if(t.length<1)return[new et(i,t,"filter array must have at least 1 element")];switch(p=p.concat(ia({key:`${i}[0]`,value:t[0],valueSpec:l.filter_operator,style:o.style,styleSpec:o.styleSpec})),Ar(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&Ar(t[1])==="$type"&&p.push(new et(i,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&p.push(new et(i,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(d=Lt(t[1]),d!=="string"&&p.push(new et(`${i}[1]`,t[1],`string expected, ${d} found`)));for(let g=2;g<t.length;g++)d=Lt(t[g]),Ar(t[1])==="$type"?p=p.concat(ia({key:`${i}[${g}]`,value:t[g],valueSpec:l.geometry_type,style:o.style,styleSpec:o.styleSpec})):d!=="string"&&d!=="number"&&d!=="boolean"&&p.push(new et(`${i}[${g}]`,t[g],`string, number, or boolean expected, ${d} found`));break;case"any":case"all":case"none":for(let g=1;g<t.length;g++)p=p.concat(sy({key:`${i}[${g}]`,value:t[g],style:o.style,styleSpec:o.styleSpec}));break;case"has":case"!has":d=Lt(t[1]),t.length!==2?p.push(new et(i,t,`filter array for "${t[0]}" operator must have 2 elements`)):d!=="string"&&p.push(new et(`${i}[1]`,t[1],`string expected, ${d} found`))}return p}function ay(o,t){const i=o.key,l=o.validateSpec,d=o.style,p=o.styleSpec,g=o.value,y=o.objectKey,S=p[`${t}_${o.layerType}`];if(!S)return[];const w=y.match(/^(.*)-transition$/);if(t==="paint"&&w&&S[w[1]]&&S[w[1]].transition)return l({key:i,value:g,valueSpec:p.transition,style:d,styleSpec:p});const P=o.valueSpec||S[y];if(!P)return[new et(i,g,`unknown property "${y}"`)];let T;if(Lt(g)==="string"&&sl(P)&&!P.tokens&&(T=/^{([^}]+)}$/.exec(g)))return[new et(i,g,`"${y}" does not support interpolation syntax
458Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(T[1])} }\`.`)];const D=[];return o.layerType==="symbol"&&y==="text-font"&&pd(na(g))&&Ar(g.type)==="identity"&&D.push(new et(i,g,'"text-font" does not support identity functions')),D.concat(l({key:o.key,value:g,valueSpec:P,style:d,styleSpec:p,expressionContext:"property",propertyType:t,propertyKey:y}))}function ly(o){return ay(o,"paint")}function cy(o){return ay(o,"layout")}function uy(o){var t,i;let l=[];const d=o.value,p=o.key,g=o.style,y=o.styleSpec;if(Lt(d)!=="object")return[new et(p,d,`object expected, ${Lt(d)} found`)];d.type||d.ref||l.push(new et(p,d,'either "type" or "ref" is required'));let S=Ar(d.type);const w=Ar(d.ref);if(d.id){const P=Ar(d.id);for(let T=0;T<o.arrayIndex;T++){const D=g.layers[T];Ar(D.id)===P&&l.push(new et(p,d.id,`duplicate layer id "${d.id}", previously used at line ${D.id.__line__}`))}}if("ref"in d){let P;["type","source","source-layer","filter","layout"].forEach(T=>{T in d&&l.push(new et(p,d[T],`"${T}" is prohibited for ref layers`))}),g.layers.forEach(T=>{Ar(T.id)===w&&(P=T)}),P?P.ref?l.push(new et(p,d.ref,"ref cannot reference another ref layer")):S=Ar(P.type):l.push(new et(p,d.ref,`ref layer "${w}" not found`))}else if(S!=="background")if(d.source){const P=g.sources&&g.sources[d.source],T=P&&Ar(P.type);P?T==="vector"&&S==="raster"?l.push(new et(p,d.source,`layer "${d.id}" requires a raster source`)):T!=="raster-dem"&&S==="hillshade"||T!=="raster-dem"&&S==="color-relief"?l.push(new et(p,d.source,`layer "${d.id}" requires a raster-dem source`)):T==="raster"&&S!=="raster"?l.push(new et(p,d.source,`layer "${d.id}" requires a vector source`)):T!=="vector"||d["source-layer"]?T==="raster-dem"&&S!=="hillshade"&&S!=="color-relief"?l.push(new et(p,d.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):S!=="line"||!d.paint||!d.paint["line-gradient"]||T==="geojson"&&P.lineMetrics||l.push(new et(p,d,`layer "${d.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):l.push(new et(p,d,`layer "${d.id}" must specify a "source-layer"`)):l.push(new et(p,d.source,`source "${d.source}" not found`))}else l.push(new et(p,d,'missing required property "source"'));return S==="raster"&&(!((t=d.paint)===null||t===void 0)&&t.resampling)&&(!((i=d.paint)===null||i===void 0)&&i["raster-resampling"])&&l.push(new et(p,d.paint,`layer "${d.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),l=l.concat(Yn({ke
vendor: 4,310 bytes, line 458
458y:p,value:d,valueSpec:y.layer,style:o.style,styleSpec:o.styleSpec,validateSpec:o.validateSpec,objectElementValidators:{"*":()=>[],type:()=>o.validateSpec({key:`${p}.type`,value:d.type,valueSpec:y.layer.type,style:o.style,styleSpec:o.styleSpec,validateSpec:o.validateSpec,object:d,objectKey:"type"}),filter:ul,layout:P=>Yn({layer:d,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":T=>cy(Us({layerType:S},T))}}),paint:P=>Yn({layer:d,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":T=>ly(Us({layerType:S},T))}})}})),l}function ds(o){const t=o.value,i=o.key,l=Lt(t);return l!=="string"?[new et(i,t,`string expected, ${l} found`)]:[]}const nf={promoteId:function({key:o,value:t}){if(Lt(t)==="string")return ds({key:o,value:t});{const i=[];for(const l in t)i.push(...ds({key:`${o}.${l}`,value:t[l]}));return i}}};function of(o){const t=o.value,i=o.key,l=o.styleSpec,d=o.style,p=o.validateSpec;if(!t.type)return[new et(i,t,'"type" is required')];const g=Ar(t.type);let y;switch(g){case"vector":case"raster":return y=Yn({key:i,value:t,valueSpec:l[`source_${g.replace("-","_")}`],style:o.style,styleSpec:l,objectElementValidators:nf,validateSpec:p}),y;case"raster-dem":return y=function(S){var w;const P=(w=S.sourceName)!==null&&w!==void 0?w:"",T=S.value,D=S.styleSpec,I=D.source_raster_dem,N=S.style;let B=[];const q=Lt(T);if(T===void 0)return B;if(q!=="object")return B.push(new et("source_raster_dem",T,`object expected, ${q} found`)),B;const W=Ar(T.encoding)==="custom",ee=["redFactor","greenFactor","blueFactor","baseShift"],X=S.value.encoding?`"${S.value.encoding}"`:"Default";for(const te in T)!W&&ee.includes(te)?B.push(new et(te,T[te],`In "${P}": "${te}" is only valid when "encoding" is set to "custom". ${X} encoding found`)):I[te]?B=B.concat(S.validateSpec({key:te,value:T[te],valueSpec:I[te],validateSpec:S.validateSpec,style:N,styleSpec:D})):B.push(new et(te,T[te],`unknown property "${te}"`));return B}({sourceName:i,value:t,style:o.style,styleSpec:l,validateSpec:p}),y;case"geojson":if(y=Yn({key:i,value:t,valueSpec:l.source_geojson,style:d,styleSpec:l,validateSpec:p,objectElementValidators:nf}),t.cluster)for(const S in t.clusterProperties){const[w,P]=t.clusterProperties[S],T=typeof w=="string"?[w,["accumulated"],["get",S]]:w;y.push(...us({key:`${i}.${S}.map`,value:P,expressionContext:"cluster-map"})),y.push(...us({key:`${i}.${S}.reduce`,value:T,expressionContext:"cluster-reduce"}))}return y;case"video":return Yn({key:i,value:t,valueSpec:l.source_video,style:d,validateSpec:p,styleSpec:l});case"image":return Yn({key:i,value:t,valueSpec:l.source_image,style:d,validateSpec:p,styleSpec:l});case"canvas":return[new et(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ia({key:`${i}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Fc(o){const t=o.value,i=o.styleSpec,l=i.light,d=o.style;let p=[];const g=Lt(t);if(t===void 0)return p;if(g!=="object")return p=p.concat([new et("light",t,`object expected, ${g} found`)]),p;for(const y in t){const S=y.match(/^(.*)-transition$/);p=p.concat(S&&l[S[1]]&&l[S[1]].transition?o.validateSpec({key:y,value:t[y],valueSpec:i.transition,validateSpec:o.validateSpec,style:d,styleSpec:i}):l[y]?o.validateSpec({key:y,value:t[y],valueSpec:l[y],validateSpec:o.validateSpec,style:d,styleSpec:i}):[new et(y,t[y],`unknown property "${y}"`)])}return p}function dy(o){const t=o.value,i=o.styleSpec,l=i.sky,d=o.style,p=Lt(t);if(t===void 0)return[];if(p!=="object")return[new et("sky",t,`object expected, ${p} found`)];let g=[];for(const y in t)g=g.concat(l[y]?o.validateSpec({key:y,value:t[y],valueSpec:l[y],style:d,styleSpec:i}):[new et(y,t[y],`unknown property "${y}"`)]);return g}function sf(o){const t=o.value,i=o.styleSpec,l=i.terrain,d=o.style;let p=[];const g=Lt(t);if(t===void 0)return p;if(g!=="object")return p=p.concat([new et("terrain",t,`object expected, ${g} found`)]),p;for(const y in t)p=p.concat(l[y]?o.validateSpec({key:y,value:t[y],valueSpec:l[y],validateSpec:o.validateSpec,style:d,styleSpec:i}):[new et(y,t[y],`unknown property "${y}"`)]);return p}function af(o){let t=[];
458const i=o.value,l=o.key;if(Array.isArray(i)){const d=[],p=[];for(const g in i)i[g].id&&d.includes(i[g].id)&&t.push(new et(l,i,`all the sprites' ids must be unique, but ${i[g].id} is duplicated`)),d.push(i[g].id),i[g].url&&p.includes(i[g].url)&&t.push(new et(l,i,`all the sprites' URLs must be unique, but ${i[g].url} is duplicated`)),p.push(i[g].url),t=t.concat(Yn({key:`${l}[${g}]`,value:i[g],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:o.validateSpec}));return t}return ds({key:l,value:i})}function hy(o){return!!o&&o.constructor===Object}function jc(o){return hy(o.value)?[]:[new et(o.key,o.value,`object expected, ${Lt(o.value)} found`)]}const lf={"*":()=>[],array:vd,boolean:function(o){const t=o.value,i=o.key,l=Lt(t);return l!=="boolean"?[new et(i,t,`boolean expected, ${l} found`)]:[]},number:cl,color:Oc,constants:oy,enum:ia,filter:ul,function:xd,layer:uy,object:Yn,source:of,light:Fc,sky:dy,terrain:sf,projection:function(o){const t=o.value,i=o.styleSpec,l=i.projection,d=o.style,p=Lt(t);if(t===void 0)return[];if(p!=="object")return[new et("projection",t,`object expected, ${p} found`)];let g=[];for(const y in t)g=g.concat(l[y]?o.validateSpec({key:y,value:t[y],valueSpec:l[y],style:d,styleSpec:i}):[new et(y,t[y],`unknown property "${y}"`)]);return g},projectionDefinition:function(o){const t=o.key;let i=o.value;i=i instanceof String?i.valueOf():i;const l=Lt(i);return l!=="array"||function(d){return Array.isArray(d)&&d.length===3&&typeof d[0]=="string"&&typeof d[1]=="string"&&typeof d[2]=="number"}(i)||function(d){return!!["interpolate","step","literal"].includes(d[0])}(i)?["array","string"].includes(l)?[]:[new et(t,i,`projection expected, invalid type "${l}" found`)]:[new et(t,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:ds,formatted:function(o){return ds(o).length===0?[]:us(o)},resolvedImage:function(o){return ds(o).length===0?[]:us(o)},padding:function(o){const t=o.key,i=o.value;if(Lt(i)==="array"){if(i.length<1||i.length>4)return[new et(t,i,`padding requires 1 to 4 values; ${i.length} values found`)];const l={type:"number"};let d=[];for(let p=0;p<i.length;p++)d=d.concat(o.validateSpec({key:`${t}[${p}]`,value:i[p],validateSpec:o.validateSpec,valueSpec:l}));return d}return cl({key:t,value:i,valueSpec:{}})},numberArray:function(o){const t=o.key,i=o.value;if(Lt(i)==="array"){const l={type:"number"};if(i.length<1)return[new et(t,i,"array length at least 1 expected, length 0 found")];let d=[];for(let p=0;p<i.length;p++)d=d.concat(o.validateSpec({key:`${t}[${p}]`,value:i[p],validateSpec:o.validateSpec,valueSpec:l}));return d}return cl({key:t,value:i,valueSpec:{}})},colorArray:function(o){const t=o.key,i=o.value;if(Lt(i)==="array"){if(i.length<1)return[new et(t,i,"array length at least 1 expected, length 0 found")];let l=[];for(let d=0;d<i.length;d++)l=l.concat(Oc({key:`${t}[${d}]`,value:i[d]}));return l}return Oc({key:t,value:i})},variableAnchorOffsetCollection:function(o){const t=o.key,i=o.value,l=Lt(i),d=o.styleSpec;if(l!=="array"||i.length<1||i.length%2!=0)return[new et(t,i,"variableAnchorOffsetCollection requires a non-empty array of even length")];let p=[];for(let g=0;g<i.length;g+=2)p=p.concat(ia({key:`${t}[${g}]`,value:i[g],valueSpec:d.layout_symbol["text-anchor"]})),p=p.concat(vd({key:`${t}[${g+1}]`,value:i[g+1],valueSpec:{length:2,value:"number"},validateSpec:o.validateSpec,style:o.style,styleSpec:d}));return p},sprite:af,state:jc,fontFaces:function(o){const t=o.key,i=o.value,l=o.validateSpec,d=o.styleSpec,p=o.style;if(!hy(i))return[new et(t,i,`object expected, ${Lt(i)} found`)];const g=[];for(const y in i){const S=i[y],w=Lt(S);if(w==="string")g.push(...ds({key:`${t}.${y}`,value:S}));else if(w==="array"){const P={url:{type:"string",required:!0},"unicode-range":{type:"array",value:"string"}};for(const[T,D]of S.entries())g.push(...Yn({key:`${t}.${y}[${T}]`,value:D,valueSpec:P,styleSpec:d,style:p,validateSpec:l}))}else g.push(new et(`${t}.${y}`,S,`string or array expected, ${w} found`))}return g}};function Nc(o){const t=o.value,i=o.valueSpec,l=o.styleSpec;return o.validateSpec=Nc,i.expression&&pd(Ar(t))?xd(o):i.expression&&fd(na(t))?us(o):i.type&&lf[i.type]?lf[i.type](o):Yn(Us({},o,{valueSpec:i.type?l[i.type]:i}))}function dl(o){const t=o.value,i=o.key,l=ds(o);return l.length||(t.indexOf("{fontstack}")===-1&&l.push(new et(i,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&l.push(new et(i,t,'"glyphs" url must include a "{range}" token'))),l}function Ti(o,t=Ue){let i=[];return i=i.concat(Nc({key:"",value:o,valueSpec:t.$root,styleSpec:t,style:o,validateSpec:Nc,objectElementValidators:{glyphs:dl,"*":()=>[]}})),o.constants&&(i=i.concat(oy({key:"constants",value:o.constants}))),py(i)}function qi(o){return function(t){return o(Object.assign({}
458,t,{validateSpec:Nc}))}}function py(o){return[].concat(o).sort((t,i)=>t.line-i.line)}function Wi(o){return function(...t){return py(o.apply(this,t))}}Ti.source=Wi(qi(of)),Ti.sprite=Wi(qi(af)),Ti.glyphs=Wi(qi(dl)),Ti.light=Wi(qi(Fc)),Ti.sky=Wi(qi(dy)),Ti.terrain=Wi(qi(sf)),Ti.state=Wi(qi(jc)),Ti.layer=Wi(qi(uy)),Ti.filter=Wi(qi(ul)),Ti.paintProperty=Wi(qi(ly)),Ti.layoutProperty=Wi(qi(cy));const ex={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class tx{constructor(t,i){this._globalState=i,this.setValue(t)}evaluate(){var t;return(t=this._literalValue)!==null&&t!==void 0?t:this._compiledValue.evaluate({})}setValue(t){if(t==null||t==="visible"||t==="none")return this._literalValue=t==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);const i=kc(t,ex,this._globalState);if(i.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(i.value.map(l=>`${l.key}: ${l.message}`).join(", "));this._literalValue=void 0,this._compiledValue=i.value,this._globalStateRefs=al(i.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}const Bc=Ue,ho=Ti,ci=ho.light,Vc=ho.sky,fy=ho.paintProperty,rx=ho.layoutProperty;function my(o,t){let i=!1;if(t!=null&&t.length)for(const l of t)o.fire(new $a(new Error(l.message))),i=!0;return i}class Do{constructor(t,i,l){const d=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const g=new Int32Array(this.arrayBuffer);t=g[0],this.d=(i=g[1])+2*(l=g[2]);for(let S=0;S<this.d*this.d;S++){const w=g[3+S],P=g[3+S+1];d.push(w===P?null:g.subarray(w,P))}const y=g[3+d.length+1];this.keys=g.subarray(g[3+d.length],y),this.bboxes=g.subarray(y),this.insert=this._insertReadonly}else{this.d=i+2*l;for(let g=0;g<this.d*this.d;g++)d.push([]);this.keys=[],this.bboxes=[]}this.n=i,this.extent=t,this.padding=l,this.scale=i/t,this.uid=0;const p=l/i*t;this.min=-p,this.max=t+p}insert(t,i,l,d,p){this._forEachCell(i,l,d,p,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(i),this.bboxes.push(l),this.bboxes.push(d),this.bboxes.push(p)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,i,l,d,p,g){this.cells[p].push(g)}query(t,i,l,d,p){const g=this.min,y=this.max;if(t<=g&&i<=g&&y<=l&&y<=d&&!p)return[...this.keys];{const S=[];return this._forEachCell(t,i,l,d,this._queryCell,S,{},p),S}}_queryCell(t,i,l,d,p,g,y,S){const w=this.cells[p];if(w!==null){const P=this.keys,T=this.bboxes;for(const D of w)if(y[D]===void 0){const I=4*D;(S?S(T[I+0],T[I+1],T[I+2],T[I+3]):t<=T[I+2]&&i<=T[I+3]&&l>=T[I+0]&&d>=T[I+1])?(y[D]=!0,g.push(P[D])):y[D]=!1}}}_forEachCell(t,i,l,d,p,g,y,S){const w=this._convertToCellCoord(t),P=this._convertToCellCoord(i),T=this._convertToCellCoord(l),D=this._convertToCellCoord(d);for(let I=w;I<=T;I++)for(let N=P;N<=D;N++){const B=this.d*N+I;if((!S||S(this._convertFromCellCoord(I),this._convertFromCellCoord(N),this._convertFromCellCoord(I+1),this._convertFromCellCoord(N+1)))&&p.call(this,t,i,l,d,B,g,y,S))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,i=3+this.cells.length+1+1;let l=0;for(const g of this.cells)l+=g.length;const d=new Int32Array(i+l+this.keys.length+this.bboxes.length);d[0]=this.extent,d[1]=this.n,d[2]=this.padding;let p=i;for(let g=0;g<t.length;g++){const y=t[g];d[3+g]=p,d.set(y,p),p+=y.length}return d[3+t.length]=p,d.set(this.keys,p),p+=this.keys.length,d[3+t.length+1]=p,d.set(this.bboxes,p),p+=this.bboxes.length,d.buffer}static serialize(t,i){const l=t.toArrayBuffer();return i&&i.push(l),{buffer:l}}static deserialize(t){return new Do(t.buffer)}}const po={};function ct(o,t,i={}){if(po[o])throw new Error(`${o} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:o,writeable:!1}),po[o]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}}ct("Object",Object),ct("Set",Set),ct("TransferableGridIndex",Do),ct("Color",Rt),
458ct("Error",Error),ct("AJAXError",Va),ct("ResolvedImage",si),ct("StylePropertyFunction",yd),ct("StyleExpression",Rc,{omit:["_evaluator"]}),ct("ZoomDependentExpression",gd),ct("ZoomConstantExpression",md),ct("CompoundExpression",Si,{omit:["_evaluate"]});for(const o in il)il[o]._classRegistryKey||ct(`Expression_${o}`,il[o]);function gy(o){var t;return o&&typeof ArrayBuffer<"u"&&(o instanceof ArrayBuffer||((t=o.constructor)===null||t===void 0?void 0:t.name)==="ArrayBuffer")}function Uc(o){return o.$name||o.constructor._classRegistryKey}function yy(o){return!function(t){if(t===null||typeof t!="object")return!1;const i=Uc(t);return i&&i!=="Object"}(o)&&(o==null||typeof o=="boolean"||typeof o=="number"||typeof o=="string"||o instanceof Boolean||o instanceof Number||o instanceof String||o instanceof Date||o instanceof RegExp||o instanceof Blob||o instanceof Error||gy(o)||Io(o)||ArrayBuffer.isView(o)||o instanceof ImageData)}function Lo(o,t){if(yy(o))return(gy(o)||Io(o))&&t&&t.push(o),ArrayBuffer.isView(o)&&t&&t.push(o.buffer),o instanceof ImageData&&t&&t.push(o.data.buffer),o;if(Array.isArray(o)){const p=[];for(const g of o)p.push(Lo(g,t));return p}if(typeof o!="object")throw new Error("can't serialize object of type "+typeof o);const i=Uc(o);if(!i)throw new Error(`can't serialize object of unregistered class ${o.constructor.name}`);if(!po[i])throw new Error(`${i} is not registered.`);const{klass:l}=po[i],d=l.serialize?l.serialize(o,t):{};if(l.serialize){if(d===(t==null?void 0:t[t.length-1]))throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const p in o){if(!o.hasOwnProperty(p)||po[i].omit.includes(p))continue;const g=o[p];d[p]=po[i].shallow.includes(p)?g:Lo(g,t)}o instanceof Error&&(d.message=o.message)}if(d.$name)throw new Error("$name property is reserved for worker serialization logic.");return i!=="Object"&&(d.$name=i),d}function $c(o){if(yy(o))return o;if(Array.isArray(o))return o.map($c);if(typeof o!="object")throw new Error("can't deserialize object of type "+typeof o);const t=Uc(o)||"Object";if(!po[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:i}=po[t];if(!i)throw new Error(`can't deserialize unregistered class ${t}`);if(i.deserialize)return i.deserialize(o);const l=Object.create(i.prototype);for(const d of Object.keys(o)){if(d==="$name")continue;const p=o[d];l[d]=po[t].shallow.includes(d)?p:$c(p)}return l}class cf{constructor(){this.first=!0}update(t,i){const l=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=l,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=l,!0):(this.lastFloorZoom>l?(this.lastIntegerZoom=l+1,this.lastIntegerZoomTime=i):this.lastFloorZoom<l&&(this.lastIntegerZoom=l,this.lastIntegerZoomTime=i),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=l,!0))}}function nx(o){return/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(o))}function oa(o){return/[\u02EA\u02EB\u1100-\u11FF\u1400-\u167F\u18B0-\u18F5\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u3007\u3012\u3013\u3020-\u302F\u3031-\u303F\u3041-\u3096\u309D-\u30FB\u30FD-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE48\uFE50-\uFE57\uFE5F-\uFE62\uFE67-\uFE6F\uFF00-\uFF07\uFF0A-\uFF0C\uFF0E-\uFF19\uFF1F-\uFF3A\uFF3C\uFF3E\uFF40-\uFF5A\uFFE0-\uFFE2\uFFE4-\uFFE7]|\uD802[\uDD80-\uDD9F]|\uD805[\uDD80-\uDDFF]|\uD806[\uDE00-\uDEBF]|\uD811[\uDC00-\uDE7F]|\uD81B[\uDFE0-\uDFE4\uDFF0-\uDFF6]|[\uD81C-\uD822\uD83D\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD30-\uDEFB]|\uD833[\uDEC0-\uDFCF]|\uD834[\uDC00-\uDDFF\uDEE0-\uDF7F]|\uD836[\uDC00-\uDEAF]|\uD83C[\uDC00-\uDE00\uDF00-\uDFFF]|\uD83E[\uDD00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(o))}function _y(o){return/\s/u.test(String.fromCodePoint(o))}function uf(o){for(const t of o)if(oa(t.codePointAt(0)))return!0;return!1}function bd(o){for(const t of o)if(!wd(t.codePointAt(0)))return!1;return!0}function vy(o){const t=o.map(i=>{try{return new RegExp(`\\p{sc=${i}}`,"u").source}catch{return null}}).filter(i=>i);return new RegExp(t.join("|"),"u")}const df=vy(["Arab","Dupl","Mong","Ougr","Syrc"]);function wd(o){return!df.test(String.fromCodePoint(o))}function hf(o){return!(oa(o)||(t=o,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(t))));var t}
vendor: 8,023 bytes, line 458
458const xy=vy(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function pf(o){return xy.test(String.fromCodePoint(o))}function by(o,t){return!(!t&&pf(o)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(o)))}function ff(o){for(const t of o)if(pf(t.codePointAt(0)))return!0;return!1}const zo=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(o){this.pluginStatus=o.pluginStatus,this.pluginURL=o.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(o){if(zo.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=o.applyArabicShaping,this.processBidirectionalText=o.processBidirectionalText,this.processStyledBidirectionalText=o.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(o,t){return c(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(o.pluginStatus!=="loading")return this.setState(o),o;const i=o.pluginURL,l=new Promise(p=>{this.loadScriptResolve=p});t(i);const d=new Promise(p=>setTimeout(()=>p(),this.TIMEOUT));if(yield Promise.race([l,d]),this.isParsed()){const p={pluginStatus:"loaded",pluginURL:i};return this.setState(p),p}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${i}`)})}};class or{constructor(t,i){this.isSupportedScript=wy,this.zoom=t,i?(this.now=i.now||0,this.fadeDuration=i.fadeDuration||0,this.zoomHistory=i.zoomHistory||new cf,this.transition=i.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new cf,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,i=t-Math.floor(t),l=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:i+(1-i)*l}:{fromScale:.5,toScale:1,t:1-(1-l)*i}}}function wy(o){return function(t,i){for(const l of t)if(!by(l.codePointAt(0),i))return!1;return!0}(o,zo.getRTLTextPluginStatus()==="loaded")}const Sd="-transition";class Gc{constructor(t,i,l){this.property=t,this.value=i,this.expression=function(d,p,g){if(pd(d))return new yd(d,p);if(fd(d)){const y=ny(d,p,g);if(y.result==="error")throw new Error(y.value.map(S=>`${S.key}: ${S.message}`).join(", "));return y.value}{let y=d;return p.type==="color"&&typeof d=="string"?y=Rt.parse(d):p.type!=="padding"||typeof d!="number"&&!Array.isArray(d)?p.type!=="numberArray"||typeof d!="number"&&!Array.isArray(d)?p.type!=="colorArray"||typeof d!="string"&&!Array.isArray(d)?p.type==="variableAnchorOffsetCollection"&&Array.isArray(d)?y=zn.parse(d):p.type==="projectionDefinition"&&typeof d=="string"&&(y=On.parse(d)):y=Et.parse(d):y=gr.parse(d):y=wn.parse(d),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>y}}}(i===void 0?t.specification.default:i,t.specification,l)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(t,i,l){return this.property.possiblyEvaluate(this,t,i,l)}}class mf{constructor(t,i){this.property=t,this.value=new Gc(t,void 0,i)}transitioned(t,i){return new yf(this.property,this.value,i,zt({},t.transition,this.transition),t.now)}untransitioned(){return new yf(this.property,this.value,null,{},0)}}class gf{constructor(t,i){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues),this._globalState=i}hasProperty(t){return t in this._properties.defaultTransitionablePropertyValues}getValue(t){return bt(this._values[t].value.value)}setValue(t,i){Object.hasOwn(this._values,t)||(this._values[t]=new mf(this._values[t].property,this._globalState)),this._values[t].value=new Gc(this._values[t].property,i===null?void 0:bt(i),this._globalState)}getTransition(t){return bt(this._values[t].transition)}setTransition(t,i){Object.hasOwn(this._values,t)||(this._values[t]=new mf(this._values[t].property,this._globalState)),this._values[t].transition=bt(i)||void 0}serialize(){const t={};for(const i of Object.keys(this._values)){const l=this.getValue(i);l!==void 0&&(t[i]=l);const d=this.getTransition(i);d!==void 0&&(t[`${i}${Sd}`]=d)}return t}transitioned(t,i){const l=new Sy(this._properties);for(const d of Object.keys(this._values))l._values[d]=this._values[d].transitioned(t,i._values[d]);return l}untransitioned(){const t=new Sy(this._properties);for(const i of Object.keys(this._values))t._values[i]=this._values[i].untransitioned();return t}}class yf{constructor(t,i,l,d,p){this.property=t,this.value=i,this.begin=p+d.delay||0,this.end=this.begin+d.duration||0,t.specification.transition&&(d.delay||d.duration)&&(this.prior=l)}possiblyEvaluate(t,i,l){const d=t.now||0,p=this.value.possiblyEvaluate(t,i,l),g=this.prior;if(g){if(d>this.end)return this.prior=null,p;if(this.value.isDataDriven())return this.prior=null,p;if(d<this.begin)return g.possiblyEvaluate(t,i,l);{const y=(d-this.begin)/(this.end-this.begin);return this.property.interpolate(g.possiblyEvaluate(t,i,l),p,mt(y))}}return p}}class Sy{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,i,l){const d=new qc(this._properties);for(const p of Object.keys(this._values))d._values[p]=this._values[p].possiblyEvaluate(t,i,l);return d}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class ix{constructor(t,i){this._properties=t,this._values=Object.create(t.defaultPropertyValues),this._globalState=i}hasValue(t){return this._values[t].value!==void 0}hasProperty(t){return t in this._properties.defaultPropertyValues}getValue(t){return bt(this._values[t].value)}setValue(t,i){this._values[t]=new Gc(this._values[t].property,i===null?void 0:bt(i),this._globalState)}serialize(){const t={};for(const i of Object.keys(this._values)){const l=this.getValue(i);l!==void 0&&(t[i]=l)}return t}possiblyEvaluate(t,i,l){const d=new qc(this._properties);for(const p of Object.keys(this._values))d._values[p]=this._values[p].possiblyEvaluate(t,i,l);return d}}class Zi{constructor(t,i,l){this.property=t,this.value=i,this.parameters=l}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,i,l,d){return this.property.evaluate(this.value,this.parameters,t,i,l,d)}}class qc{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class ft{constructor(t){this.specification=t}possiblyEvaluate(t,i){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(i)}interpolate(t,i,l){const d=ai[this.specification.type];return d?d(t,i,l):t}}class vt{constructor(t,i){this.specification=t,this.overrides=i}possiblyEvaluate(t,i,l,d){return new Zi(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(i,null,{},l,d)}:t.expression,i)}interpolate(t,i,l){if(t.value.kind!=="constant"||i.value.kind!=="constant")return t;if(t.value.value===void 0||i.value.value===void 0)return new Zi(this,{kind:"constant",value:void 0},t.parameters);const d=ai[this.specification.type];if(d){const p=d(t.value.value,i.value.value,l);return new Zi(this,{kind:"constant",value:p},t.parameters)}return t}evaluate(t,i,l,d,p,g){return t.kind==="constant"?t.value:t.evaluate(i,l,d,p,g)}}
458class hs extends vt{possiblyEvaluate(t,i,l,d){if(t.value===void 0)return new Zi(this,{kind:"constant",value:void 0},i);if(t.expression.kind==="constant"){const p=t.expression.evaluate(i,null,{},l,d),g=t.property.specification.type==="resolvedImage"&&typeof p!="string"?p.name:p,y=this._calculate(g,g,g,i);return new Zi(this,{kind:"constant",value:y},i)}if(t.expression.kind==="camera"){const p=this._calculate(t.expression.evaluate({zoom:i.zoom-1}),t.expression.evaluate({zoom:i.zoom}),t.expression.evaluate({zoom:i.zoom+1}),i);return new Zi(this,{kind:"constant",value:p},i)}return new Zi(this,t.expression,i)}evaluate(t,i,l,d,p,g){if(t.kind==="source"){const y=t.evaluate(i,l,d,p,g);return this._calculate(y,y,y,i)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(i.zoom)-1},l,d),t.evaluate({zoom:Math.floor(i.zoom)},l,d),t.evaluate({zoom:Math.floor(i.zoom)+1},l,d),i):t.value}_calculate(t,i,l,d){return d.zoom>d.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:l,to:i}}interpolate(t){return t}}class Ty{constructor(t){this.specification=t}possiblyEvaluate(t,i,l,d){if(t.value!==void 0){if(t.expression.kind==="constant"){const p=t.expression.evaluate(i,null,{},l,d);return this._calculate(p,p,p,i)}return this._calculate(t.expression.evaluate(new or(Math.floor(i.zoom-1),i)),t.expression.evaluate(new or(Math.floor(i.zoom),i)),t.expression.evaluate(new or(Math.floor(i.zoom+1),i)),i)}}_calculate(t,i,l,d){return d.zoom>d.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:l,to:i}}interpolate(t){return t}}class hl{constructor(t){this.specification=t}possiblyEvaluate(t,i,l,d){return!!t.expression.evaluate(i,null,{},l,d)}interpolate(){return!1}}class Fn{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const i in t){const l=t[i];l.specification.overridable&&this.overridableProperties.push(i);const d=this.defaultPropertyValues[i]=new Gc(l,void 0,void 0),p=this.defaultTransitionablePropertyValues[i]=new mf(l,void 0);this.defaultTransitioningPropertyValues[i]=p.untransitioned(),this.defaultPossiblyEvaluatedValues[i]=d.possiblyEvaluate({})}}}ct("DataDrivenProperty",vt),ct("DataConstantProperty",ft),ct("CrossFadedDataDrivenProperty",hs),ct("CrossFadedProperty",Ty),ct("ColorRampProperty",hl);const Ey=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",Td=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class Ei extends $u{constructor(t,i,l){if(super(),this.id=t.id,this.type=t.type,this._globalState=l,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(d,p){return new tx(d,p)}(this.visibility,l),t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter,this._featureFilter=Dc(t.filter,l)),i.layout&&(this._unevaluatedLayout=new ix(i.layout,l)),i.paint)){this._transitionablePaint=new gf(i.paint,l);for(const d in t.paint)this.setPaintProperty(d,t.paint[d],{validate:!1});for(const d in t.layout)this.setLayoutProperty(d,t.layout[d],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new qc(i.paint)}}setFilter(t){this.filter=t,this._featureFilter=Dc(t,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){var i;if(t==="visibility")return this.visibility;if(!((i=this._transitionablePaint)===null||i===void 0)&&i.hasProperty(t))throw new Error(t+Ey);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${t}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(t)}getLayoutAffectingGlobalStateRefs(){const t=new Set;for(const i of this._visibilityExpression.getGlobalStateRefs())t.add(i);if(this._unevaluatedLayout)for(const i in this._unevaluatedLayout._values){const l=this._unevaluatedLayout._values[i];for(const d of l.getGlobalStateRefs())t.add(d)}for(const i of this._featureFilter.getGlobalStateRefs())t.add(i);return t}getPaintAffectingGlobalStateRefs(){var t;const i=new globalThis.Map;if(this._transitionablePaint)for(const l in this._transitionablePaint._values){const d=this._transitionablePaint._values[l].value;for(const p of d.getGlobalStateRefs()){const g=(t=i.get(p))!==null&&t!==void 0?t:[];g.push({name:l,value:d.value}),i.set(p,g)}}return i}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(t,i,l={}){var d;if(t==="visibility")return this.visibility=i,this._visibilityExpression.setValue(i),void this.recalculateVisibility();!((d=this._transitionablePaint)===null||d===void 0)&&d.hasProperty(t)?this.fire(new $a(new Error(t+Ey))):i!=null&&this._val
458idate(rx,`layers.${this.id}.layout.${t}`,t,i,l)||this._unevaluatedLayout.setValue(t,i)}getPaintProperty(t){var i,l;if(t.endsWith(Sd)){const d=t.slice(0,-11);if(d==="visibility"||!((i=this._unevaluatedLayout)===null||i===void 0)&&i.hasProperty(d))throw new Error(t+Td);return this._transitionablePaint.getTransition(d)}if(t==="visibility"||!((l=this._unevaluatedLayout)===null||l===void 0)&&l.hasProperty(t))throw new Error(t+Td);return this._transitionablePaint.getValue(t)}setPaintProperty(t,i,l={}){var d;if(t==="visibility"||!((d=this._unevaluatedLayout)===null||d===void 0)&&d.hasProperty(t))return this.fire(new $a(new Error(t+Td))),!1;if(i!=null&&this._validate(fy,`layers.${this.id}.paint.${t}`,t,i,l))return!1;if(t.endsWith(Sd))return this._transitionablePaint.setTransition(t.slice(0,-11),i||void 0),!1;{const p=this._transitionablePaint._values[t],g=p.property.specification["property-type"]==="cross-faded-data-driven",y=p.value.isDataDriven(),S=p.value;this._transitionablePaint.setValue(t,i),this._handleSpecialPaintPropertyUpdate(t);const w=this._transitionablePaint._values[t].value;return w.isDataDriven()||y||g||this._handleOverridablePaintPropertyUpdate(t,S,w)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,i,l){return!1}isHidden(t=this.minzoom,i=!1){return!!(this.minzoom&&t<(i?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&t>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(t,i){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,i)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,i)}serialize(){var t,i;
vendor: 15,283 bytes, line 458
458const l={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:(t=this._unevaluatedLayout)===null||t===void 0?void 0:t.serialize(),paint:(i=this._transitionablePaint)===null||i===void 0?void 0:i.serialize()};return this.visibility&&(l.layout||(l.layout={}),l.layout.visibility=this.visibility),lo(l,(d,p)=>!(d===void 0||p==="layout"&&!Object.keys(d).length||p==="paint"&&!Object.keys(d).length))}_validate(t,i,l,d,p={}){return(p==null?void 0:p.validate)!==!1&&my(this,t.call(ho,{key:i,layerType:this.type,objectKey:l,value:d,styleSpec:Ue,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const i=this.paint.get(t);if(i instanceof Zi&&sl(i.property.specification)&&(i.value.kind==="source"||i.value.kind==="composite")&&i.value.isStateDependent)return!0}return!1}}let _f;var ox={get paint(){return _f=_f||new Fn({"raster-opacity":new ft(Ue.paint_raster["raster-opacity"]),"raster-hue-rotate":new ft(Ue.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ft(Ue.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ft(Ue.paint_raster["raster-brightness-max"]),"raster-saturation":new ft(Ue.paint_raster["raster-saturation"]),"raster-contrast":new ft(Ue.paint_raster["raster-contrast"]),resampling:new ft(Ue.paint_raster.resampling),"raster-resampling":new ft(Ue.paint_raster["raster-resampling"]),"raster-fade-duration":new ft(Ue.paint_raster["raster-fade-duration"])})}};class sx extends Ei{constructor(t,i){super(t,ox,i)}}const ax={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Wc{constructor(t,i){this._structArray=t,this._pos1=i*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class yr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,i){return t._trim(),i&&(t.isTransferred=!0,i.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const i=Object.create(this.prototype);return i.arrayBuffer=t.arrayBuffer,i.length=t.length,i.capacity=t.arrayBuffer.byteLength/i.bytesPerElement,i._refreshViews(),i}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const i=this.uint8;this._refreshViews(),i&&this.uint8.set(i)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ar(o,t=1){let i=0,l=0;return{members:o.map(d=>{const p=ax[d.type].BYTES_PER_ELEMENT,g=i=Py(i,Math.max(t,p)),y=d.components||1;return l=Math.max(l,p),i+=p*y,{name:d.name,type:d.type,components:y,offset:g}}),size:Py(i,Math.max(l,t)),alignment:t}}function Py(o,t){return Math.ceil(o/t)*t}class Zc extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i){const l=this.length;return this.resize(l+1),this.emplace(l,t,i)}emplace(t,i,l){const d=2*t;return this.int16[d+0]=i,this.int16[d+1]=l,t}}Zc.prototype.bytesPerElement=4,ct("StructArrayLayout2i4",Zc);class Ed extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,l){const d=this.length;return this.resize(d+1),this.emplace(d,t,i,l)}emplace(t,i,l,d){const p=3*t;return this.int16[p+0]=i,this.int16[p+1]=l,this.int16[p+2]=d,t}}Ed.prototype.bytesPerElement=6,ct("StructArrayLayout3i6",Ed);class Pd extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,l,d){const p=this.length;return this.resize(p+1),this.emplace(p,t,i,l,d)}emplace(t,i,l,d,p){const g=4*t;return this.int16[g+0]=i,this.int16[g+1]=l,this.int16[g+2]=d,this.int16[g+3]=p,t}}Pd.prototype.bytesPerElement=8,ct("StructArrayLayout4i8",Pd);class Cd extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,l,d,p,g)}emplace(t,i,l,d,p,g,y){const S=6*t;return this.int16[S+0]=i,this.int16[S+1]=l,this.int16[S+2]=d,this.int16[S+3]=p,this.int16[S+4]=g,this.int16[S+5]=y,t}}Cd.prototype.bytesPerElement=12,ct("StructArrayLayout2i4i12",Cd);class vf extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,l,d,p,g)}emplace(t,i,l,d,p,g,y){const S=4*t,w=8*t;return this.int16[S+0]=i,this.int16[S+1]=l,this.uint8[w+4]=d,this.uint8[w+5]=p,this.uint8[w+6]=g,this.uint8[w+7]=y,t}}vf.prototype.bytesPerElement=8,ct("StructArrayLayout2i4ub8",vf);class Hc extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i){const l=this.length;return this.resize(l+1),this.emplace(l,t,i)}emplace(t,i,l){const d=2*t;return this.float32[d+0]=i,this.float32[d+1]=l,t}}Hc.prototype.bytesPerElement=8,ct("StructArrayLayout2f8",Hc);class Oo extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g,y,S,w,P){const T=this.length;return this.resize(T+1),this.emplace(T,t,i,l,d,p,g,y,S,w,P)}emplace(t,i,l,d,p,g,y,S,w,P,T){const D=10*t;return this.uint16[D+0]=i,this.uint16[D+1]=l,this.uint16[D+2]=d,this.uint16[D+3]=p,this.uint16[D+4]=g,this.uint16[D+5]=y,this.uint16[D+6]=S,this.uint16[D+7]=w,this.uint16[D+8]=P,this.uint16[D+9]=T,t}}Oo.prototype.bytesPerElement=20,ct("StructArrayLayout10ui20",Oo);class Id extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g,y,S){const w=this.length;return this.resize(w+1),this.emplace(w,t,i,l,d,p,g,y,S)}emplace(t,i,l,d,p,g,y,S,w){const P=8*t;return this.uint16[P+0]=i,this.uint16[P+1]=l,this.uint16[P+2]=d,this.uint16[P+3]=p,this.uint16[P+4]=g,this.uint16[P+5]=y,this.uint16[P+6]=S,this.uint16[P+7]=w,t}}Id.prototype.bytesPerElement=16,ct("StructArrayLayout8ui16",Id);class Xc extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g,y,S,w,P,T,D){const I=this.length;return this.resize(I+1),this.emplace(I,t,i,l,d,p,g,y,S,w,P,T,D)}emplace(t,i,l,d,p,g,y,S,w,P,T,D,I){const N=12*t;return this.int16[N+0]=i,this.int16[N+1]=l,this.int16[N+2]=d,this.int16[N+3]=p,this.uint16[N+4]=g,this.uint16[N+5]=y,this.uint16[N+6]=S,this.uint16[N+7]=w,this.int16[N+8]=P,this.int16[N+9]=T,this.int16[N+10]=D,this.int16[N+11]=I,t}}Xc.prototype.bytesPerElement=24,ct("StructArrayLayout4i4ui4i24",Xc);class Md extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,l){const d=this.length;return this.resize(d+1),this.emplace(d,t,i,l)}emplace(t,i,l,d){const p=3*t;return this.float32[p+0]=i,this.float32[p+1]=l,this.float32[p+2]=d,t}}Md.prototype.bytesPerElement=12,ct("StructArrayLayout3f12",Md);class Kc extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint32[1*t+0]=i,t}}Kc.prototype.bytesPerElement=4,ct("StructArrayLayout1ul4",Kc);class xf extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g,y,S,w){const P=this.length;return this.resize(P+1),this.emplace(P,t,i,l,d,p,g,y,S,w)}emplace(t,i,l,d,p,g,y,S,w,P){const T=10*t,D=5*t;return this.int16[T+0]=i,this.int16[T+1]=l,this.int16[T+2]=d,this.int16[T+3]=p,this.int16[T+4]=g,this.int16[T+5]=y,this.uint32[D+3]=S,this.uint16[T+8]=w,this.uint16[T+9]=P,t}}xf.prototype.bytesPerElement=20,ct("StructArrayLayout6i1ul2ui20",xf);class pl extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,l,d,p,g)}emplace(t,i,l,d,p,g,y){const S=6*t;return this.int16[S+0]=i,this.int16[S+1]=l,this.int16[S+2]=d,this.int16[S+3]=p,this.int16[S+4]=g,this.int16[S+5]=y,t}}pl.prototype.bytesPerElement=12,ct("StructArrayLayout2i2i2i12",pl);class sa extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p){const g=this.length;return this.resize(g+1),this.emplace(g,t,i,l,d,p)}emplace(t,i,l,d,p,g){const y=4*t,S=8*t;return this.float32[y+0]=i,this.float32[y+1]=l,this.float32[y+2]=d,this.int16[S+6]=p,this.int16[S+7]=g,t}}sa.prototype.bytesPerElement=16,ct("StructArrayLayout2f1f2i16",sa);class bf extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g){const y=this.length;return this.resize(y+1),this.emplace(y,t,i,l,d,p,g)}emplace(t,i,l,d,p,g,y){const S=16*t,w=4*t,P=8*t;return this.uint8[S+0]=i,this.uint8[S+1]=l,this.float32[w+1]=d,this.float32[w+2]=p,this.int16[P+6]=g,this.int16[P+7]=y,t}}bf.prototype.bytesPerElement=16,ct("StructArrayLayout2ub2f2i16",bf);class Yc extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,l){const d=this.length;return this.resize(d+1),this.emplace(d,t,i,l)}emplace(t,i,l,d){const p=3*t;return this.uint16[p+0]=i,this.uint16[p+1]=l,this.uint16[p+2]=d,t}}Yc.prototype.bytesPerElement=6,ct("StructArrayLayout3ui6",Yc);class aa extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g,y,S,w,P,T,D,I,N,B,q,W){const ee=this.length;return this.resize(ee+1),this.emplace(ee,t,i,l,d,p,g,y,S,w,P,T,D,I,N,B,q,W)}emplace(t,i,l,d,p,g,y,S,w,P,T,D,I,N,B,q,W,ee){const X=24*t,te=12*t,le=48*t;return this.int16[X+0]=i,this.int16[X+1]=l,this.uint16[X+2]=d,this.uint16[X+3]=p,this.uint32[te+2]=g,this.uint32[te+3]=y,this.uint32[te+4]=S,this.uint16[X+10]=w,this.uint16[X+11]=P,this.uint16[X+12]=T,this.float32[te+7]=D,this.float32[te+8]=I,this.uint8[le+36]=N,this.uint8[le+37]=B,this.uint8[le+38]=q,this.uint32[te+10]=W,this.int16[X+22]=ee,t}}aa.prototype.bytesPerElement=48,ct("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",aa);class wf extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,l,d,p,g,y,S,w,P,T,D,I,N,B,q,W,ee,X,te,le,he,Se,Ee,Oe,ke,Be,Ve){const Fe=this.length;return this.resize(Fe+1),this.emplace(Fe,t,i,l,d,p,g,y,S,w,P,T,D,I,N,B,q,W,ee,X,te,le,he,Se,Ee,Oe,ke,Be,Ve)}emplace(t,i,l,d,p,g,y,S,w,P,T,D,I,N,B,q,W,ee,X,te,le,he,Se,Ee,Oe,ke,Be,Ve,Fe){const Le=32*t,Ye=16*t;return this.int16[Le+0]=i,this.int16[Le+1]=l,this.int16[Le+2]=d,this.int16[Le+3]=p,this.int16[Le+4]=g,this.int16[Le+5]=y,this.int16[Le+6]=S,this.int16[Le+7]=w,this.uint16[Le+8]=P,this.uint16[Le+9]=T,this.uint16[Le+10]=D,this.uint16[Le+11]=I,this.uint16[Le+12]=N,this.uint16[Le+13]=B,this.uint16[Le+14]=q,this.uint16[Le+15]=W,this.uint16[Le+16]=ee,this.uint16[Le+17]=X,this.uint16[Le+18]=te,this.uint16[Le+19]=le,this.uint16[Le+20]=he,this.uint16[Le+21]=Se,this.uint16[Le+22]=Ee,this.uint32[Ye+12]=Oe,this.float32[Ye+13]=ke,this.float32[Ye+14]=Be,this.uint16[Le+30]=Ve,this.uint16[Le+31]=Fe,t}}wf.prototype.bytesPerElement=64,ct("StructArrayLayout8i15ui1ul2f2ui64",wf);class Ad extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.float32[1*t+0]=i,t}}Ad.prototype.bytesPerElement=4,ct("StructArrayLayout1f4",Ad);class Rd extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,l){const d=this.length;return this.resize(d+1),this.emplace(d,t,i,l)}emplace(t,i,l,d){const p=3*t;return this.uint16[6*t+0]=i,this.float32[p+1]=l,this.float32[p+2]=d,t}}Rd.prototype.bytesPerElement=12,ct("StructArrayLayout1ui2f12",Rd);class Sf extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,l){const d=this.length;return this.resize(d+1),this.emplace(d,t,i,l)}emplace(t,i,l,d){const p=4*t;return this.uint32[2*t+0]=i,this.uint16[p+2]=l,this.uint16[p+3]=d,t}}Sf.prototype.bytesPerElement=8,ct("StructArrayLayout1ul2ui8",Sf);class _ extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i){const l=this.length;return this.resize(l+1),this.emplace(l,t,i)}emplace(t,i,l){const d=2*t;return this.uint16[d+0]=i,this.uint16[d+1]=l,t}}_.prototype.bytesPerElement=4,ct("StructArrayLayout2ui4",_);class n extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint16[1*t+0]=i,t}}n.prototype.bytesPerElement=2,ct("StructArrayLayout1ui2",n);class a extends yr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,l,d){const p=this.length;return this.resize(p+1),this.emplace(p,t,i,l,d)}emplace(t,i,l,d,p){const g=4*t;return this.float32[g+0]=i,this.float32[g+1]=l,this.float32[g+2]=d,this.float32[g+3]=p,t}}a.prototype.bytesPerElement=16,ct("StructArrayLayout4f16",a);class h extends Wc{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}
vendor: 6,910 bytes, line 458
458get anchorPoint(){return new A(this.anchorPointX,this.anchorPointY)}}h.prototype.size=20;class f extends xf{get(t){return new h(this,t)}}ct("CollisionBoxArray",f);class b extends Wc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}b.prototype.size=48;class E extends aa{get(t){return new b(this,t)}}ct("PlacedSymbolArray",E);class C extends Wc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(t){this._structArray.uint32[this._pos4+12]=t}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}C.prototype.size=64;class k extends wf{get(t){return new C(this,t)}}ct("SymbolInstanceArray",k);class O extends Ad{getoffsetX(t){return this.float32[1*t+0]}}ct("GlyphOffsetArray",O);class F extends Ed{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}ct("SymbolLineVertexArray",F);class U extends Wc{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}U.prototype.size=12;class $ extends Rd{get(t){return new U(this,t)}}ct("TextAnchorOffsetArray",$);class H extends Wc{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}H.prototype.size=8;class oe extends Sf{get(t){return new H(this,t)}}ct("FeatureIndexArray",oe);class de extends Zc{}class me extends Zc{}class pe extends Zc{}class ge extends Cd{}class we extends vf{}class ye extends Hc{}class fe extends Oo{}class be extends Id{}class _e extends Xc{}class Ie extends Md{}class je extends Kc{}class Ne extends pl{}class Xe extends bf{}class He extends Yc{}class pt extends _{}const rt=ar([{name:"a_pos",components:2,type:"Int16"}],4),{members:Ge}=rt;class lt{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,i,l,d){const p=this.segments[this.segments.length-1];return t>lt.MAX_VERTEX_ARRAY_LENGTH&&Nr(`Max vertices per segment is ${lt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${lt.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!p||p.vertexLength+t>lt.MAX_VERTEX_ARRAY_LENGTH||p.sortKey!==d?this.createNewSegment(i,l,d):p}createNewSegment(t,i,l){const d={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0,vaos:{}};return l!==void 0&&(d.sortKey=l),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(d),d}getOrCreateLatestSegment(t,i,l){return this.prepareSegment(0,t,i,l)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const i in t.vaos)t.vaos[i].destroy()}static simpleSegment(t,i,l,d){return new lt([{vertexOffset:t,primitiveOffset:i,vertexLength:l,primitiveLength:d,vaos:{},sortKey:0}])}}function gt(o,t){return 256*(o=Tt(Math.floor(o),0,255))+Tt(Math.floor(t),0,255)}lt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,ct("SegmentVector",lt);const Kt=ar([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Rr=ar([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var tr,Lr,Br,Sn={exports:{}},Sr={exports:{}},jn={exports:{}},hn=function(){if(Br)return Sn.exports;Br=1;var o=(tr||(tr=1,Sr.exports=function(i,l){var d,p,g,y,S,w,P,T;for(p=i.length-(d=3&i.length),g=l,S=3432918353,w=461845907,T=0;T<p;
vendor: 2,519 bytes, line 458
458)P=255&i.charCodeAt(T)|(255&i.charCodeAt(++T))<<8|(255&i.charCodeAt(++T))<<16|(255&i.charCodeAt(++T))<<24,++T,g=27492+(65535&(y=5*(65535&(g=(g^=P=(65535&(P=(P=(65535&P)*S+(((P>>>16)*S&65535)<<16)&4294967295)<<15|P>>>17))*w+(((P>>>16)*w&65535)<<16)&4294967295)<<13|g>>>19))+((5*(g>>>16)&65535)<<16)&4294967295))+((58964+(y>>>16)&65535)<<16);switch(P=0,d){case 3:P^=(255&i.charCodeAt(T+2))<<16;case 2:P^=(255&i.charCodeAt(T+1))<<8;case 1:g^=P=(65535&(P=(P=(65535&(P^=255&i.charCodeAt(T)))*S+(((P>>>16)*S&65535)<<16)&4294967295)<<15|P>>>17))*w+(((P>>>16)*w&65535)<<16)&4294967295}return g^=i.length,g=2246822507*(65535&(g^=g>>>16))+((2246822507*(g>>>16)&65535)<<16)&4294967295,g=3266489909*(65535&(g^=g>>>13))+((3266489909*(g>>>16)&65535)<<16)&4294967295,(g^=g>>>16)>>>0}),Sr.exports),t=(Lr||(Lr=1,jn.exports=function(i,l){for(var d,p=i.length,g=l^p,y=0;p>=4;)d=1540483477*(65535&(d=255&i.charCodeAt(y)|(255&i.charCodeAt(++y))<<8|(255&i.charCodeAt(++y))<<16|(255&i.charCodeAt(++y))<<24))+((1540483477*(d>>>16)&65535)<<16),g=1540483477*(65535&g)+((1540483477*(g>>>16)&65535)<<16)^(d=1540483477*(65535&(d^=d>>>24))+((1540483477*(d>>>16)&65535)<<16)),p-=4,++y;switch(p){case 3:g^=(255&i.charCodeAt(y+2))<<16;case 2:g^=(255&i.charCodeAt(y+1))<<8;case 1:g=1540483477*(65535&(g^=255&i.charCodeAt(y)))+((1540483477*(g>>>16)&65535)<<16)}return g=1540483477*(65535&(g^=g>>>13))+((1540483477*(g>>>16)&65535)<<16),(g^=g>>>15)>>>0}),jn.exports);return Sn.exports=o,Sn.exports.murmur3=o,Sn.exports.murmur2=t,Sn.exports}(),Qr=L(hn);class Tn{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,i,l,d){this.ids.push(ps(t)),this.positions.push(i,l,d)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const i=ps(t);let l=0,d=this.ids.length-1;for(;l<d;){const g=l+d>>1;this.ids[g]>=i?d=g:l=g+1}const p=[];for(;this.ids[l]===i;)p.push({index:this.positions[3*l],start:this.positions[3*l+1],end:this.positions[3*l+2]}),l++;return p}static serialize(t,i){const l=new Float64Array(t.ids),d=new Uint32Array(t.positions);return fs(l,d,0,l.length-1),i&&i.push(l.buffer,d.buffer),{ids:l,positions:d}}static deserialize(t){const i=new Tn;return i.ids=t.ids,i.positions=t.positions,i.indexed=!0,i}}function ps(o){const t=+o;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Qr(String(o))}function fs(o,t,i,l){for(;i<l;){const d=o[i+l>>1];let p=i-1,g=l+1;for(;;){do p++;while(o[p]<d);do g--;while(o[g]>d);if(p>=g)break;ms(o,p,g),ms(t,3*p,3*g),ms(t,3*p+1,3*g+1),ms(t,3*p+2,3*g+2)}
458g-i<l-g?(fs(o,t,i,g),i=g+1):(fs(o,t,g+1,l),l=g)}}function ms(o,t,i){const l=o[t];o[t]=o[i],o[i]=l}ct("FeaturePositionMap",Tn);class En{constructor(t,i){this.gl=t.gl,this.location=i}}class Fo extends En{constructor(t,i){super(t,i),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class gs extends En{constructor(t,i){super(t,i),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class kd extends En{constructor(t,i){super(t,i),this.current=Rt.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const fo=new Float32Array(16);function mo(o){return[gt(255*o.r,255*o.g),gt(255*o.b,255*o.a)]}class ui{constructor(t,i,l){this.value=t,this.uniformNames=i.map(d=>`u_${d}`),this.type=l}setUniform(t,i,l){t.set(l.constantOr(this.value))}getBinding(t,i,l){return this.type==="color"?new kd(t,i):new Fo(t,i)}}class Pi{constructor(t,i){this.uniformNames=i.map(l=>`u_${l}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,i){this.pixelRatioFrom=i.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=i.tlbr,this.patternTo=t.tlbr}setConstantDashPositions(t,i){this.dashTo=[0,t.y,t.height,t.width],this.dashFrom=[0,i.y,i.height,i.width]}setUniform(t,i,l,d){let p=null;d==="u_pattern_to"?p=this.patternTo:d==="u_pattern_from"?p=this.patternFrom:d==="u_dasharray_to"?p=this.dashTo:d==="u_dasharray_from"?p=this.dashFrom:d==="u_pixel_ratio_to"?p=this.pixelRatioTo:d==="u_pixel_ratio_from"&&(p=this.pixelRatioFrom),p!==null&&t.set(p)}getBinding(t,i,l){return l.startsWith("u_pattern")||l.startsWith("u_dasharray_")?new gs(t,i):new Fo(t,i)}}class _r{constructor(t,i,l,d){this.expression=t,this.type=l,this.maxValue=0,this.paintVertexAttributes=i.map(p=>({name:`a_${p}`,type:"Float32",components:l==="color"?2:1,offset:0})),this.paintVertexArray=new d}populatePaintArray(t,i,l){const d=this.paintVertexArray.length,p=this.expression.evaluate(new or(0,l),i,{},l.canonical,[],l.formattedSection);this.paintVertexArray.resize(t),this._setPaintValue(d,t,p)}updatePaintArray(t,i,l,d,p){const g=this.expression.evaluate(new or(0,p),l,d);this._setPaintValue(t,i,g)}_setPaintValue(t,i,l){if(this.type==="color"){const d=mo(l);for(let p=t;p<i;p++)this.paintVertexArray.emplace(p,d[0],d[1])}else{for(let d=t;d<i;d++)this.paintVertexArray.emplace(d,l);this.maxValue=Math.max(this.maxValue,Math.abs(l))}}upload(t){var i,l;!((i=this.paintVertexArray)===null||i===void 0)&&i.arrayBuffer.byteLength&&(!((l=this.paintVertexBuffer)===null||l===void 0)&&l.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class ur{constructor(t,i,l,d,p,g){this.expression=t,this.uniformNames=i.map(y=>`u_${y}_t`),this.type=l,this.useIntegerZoom=d,this.zoom=p,this.maxValue=0,this.paintVertexAttributes=i.map(y=>({name:`a_${y}`,type:"Float32",components:l==="color"?4:2,offset:0})),this.paintVertexArray=new g}populatePaintArray(t,i,l){const d=this.expression.evaluate(new or(this.zoom,l),i,{},l.canonical,[],l.formattedSection),p=this.expression.evaluate(new or(this.zoom+1,l),i,{},l.canonical,[],l.formattedSection),g=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(g,t,d,p)}updatePaintArray(t,i,l,d,p){const g=this.expression.evaluate(new or(this.zoom,p),l,d),y=this.expression.evaluate(new or(this.zoom+1,p),l,d);this._setPaintValue(t,i,g,y)}_setPaintValue(t,i,l,d){if(this.type==="color"){const p=mo(l),g=mo(d);for(let y=t;y<i;y++)this.paintVertexArray.emplace(y,p[0],p[1],g[0],g[1])}else{for(let p=t;p<i;p++)this.paintVertexArray.emplace(p,l,d);this.maxValue=Math.max(this.maxValue,Math.abs(l),Math.abs(d))}}upload(t){var i,l;!((i=this.paintVertexArray)===null||i===void 0)&&i.arrayBuffer.byteLength&&(!((l=this.paintVertexBuffer)===null||l===void 0)&&l.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,i){const l=this.useIntegerZoom?Math.floor(i.zoom):i.zoom,d=Tt(this.expression.interpolationFactor(l,this.zoom,this.zoom+1),0,1);t.set(d)}getBinding(t,i,l){return new Fo(t,i)}}class Vr{constructor(t,i,l,d,p,g){this.expression=t,this.type=i,this.useIntegerZoom=l,this.zoom=d,this.layerId=g,this.zoomInPaintVertexArray=new p,this.zoomOutPaintVertexArray=new p}populatePaintArray(t,i,l){const d=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(d,t,this.getPositionIds(i),l)}updatePaintArray(t,i,l,d,p){this._setPaintValues(t,i,this.getPositionIds(l),p)}_setPaintValues(t,i,l,d){const p=this.getPositions(d);if(!p||!l)return;const g=p[l.min],y=p[l.mid],S=p[l.max];if(g&&y&&S)for(let w=t;w<i;w++)this.emplace(this.zoomInPaintVertexArray,w,y,g),this.emplace(this.zoomOutPaintVertexArray,w,y,S)}upload(t){var i,l;if(!((i=this.zoomInPaintVertexArray)===null||i===void 0)&&i.arrayBuffer.byteLength&&(!((l=this.zoomOutPaintVertexArray)===null||l===void 0)&&l.arrayBuffer.byteLength)){const d=this.getVertexAttributes();this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,d,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,d,this.expression.isStateDependent)}}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class vr extends Vr{getPositions(t){return t.imagePositions}getPositionIds(t){var i;return(i=t.patterns)===null||i===void 0?void 0:i[this.layerId]}getVertexAttributes(){return Kt.members}emplace(t,i,l,d){t.emplace(i,l.tlbr[0],l.tlbr[1],l.tlbr[2],l.tlbr[3],d.tlbr[0],d.tlbr[1],d.tlbr[2],d.tlbr[3],l.pixelRatio,d.pixelRatio)}}class la extends Vr{getPositions(t){return t.dashPositions}getPositionIds(t){var i;
vendor: 4,717 bytes, line 458
458return(i=t.dashes)===null||i===void 0?void 0:i[this.layerId]}getVertexAttributes(){return Rr.members}emplace(t,i,l,d){t.emplace(i,0,l.y,l.height,l.width,0,d.y,d.height,d.width)}}class Dd{constructor(t,i,l){this.binders={},this._buffers=[];const d=[];for(const p in t.paint._values){if(!l(p))continue;const g=t.paint.get(p);if(!(g instanceof Zi&&sl(g.property.specification)))continue;const y=Tf(p,t.type),S=g.value,w=g.property.specification.type,P=g.property.useIntegerZoom,T=g.property.specification["property-type"],D=T==="cross-faded"||T==="cross-faded-data-driven";if(S.kind==="constant")this.binders[p]=D?new Pi(S.value,y):new ui(S.value,y,w),d.push(`/u_${p}`);else if(S.kind==="source"||D){const I=Cy(p,w,"source");this.binders[p]=D?p==="line-dasharray"?new la(S,w,P,i,I,t.id):new vr(S,w,P,i,I,t.id):new _r(S,y,w,I),d.push(`/a_${p}`)}else{const I=Cy(p,w,"composite");this.binders[p]=new ur(S,y,w,P,i,I),d.push(`/z_${p}`)}}this.cacheKey=d.sort().join("")}getMaxValue(t){const i=this.binders[t];return i instanceof _r||i instanceof ur?i.maxValue:0}populatePaintArrays(t,i,l){for(const d in this.binders){const p=this.binders[d];(p instanceof _r||p instanceof ur||p instanceof Vr)&&p.populatePaintArray(t,i,l)}}setConstantPatternPositions(t,i){for(const l in this.binders){const d=this.binders[l];d instanceof Pi&&d.setConstantPatternPositions(t,i)}}setConstantDashPositions(t,i){for(const l in this.binders){const d=this.binders[l];d instanceof Pi&&d.setConstantDashPositions(t,i)}}updatePaintArrays(t,i,l,d,p){let g=!1;for(const y in t){const S=i.getPositions(y);for(const w of S){const P=l.feature(w.index);for(const T in this.binders){const D=this.binders[T];if((D instanceof _r||D instanceof ur||D instanceof Vr)&&D.expression.isStateDependent===!0){const I=d.paint.get(T);D.expression=I.value,D.updatePaintArray(w.start,w.end,P,t[y],p),g=!0}}}}return g}defines(){const t=[];for(const i in this.binders){const l=this.binders[i];(l instanceof ui||l instanceof Pi)&&t.push(...l.uniformNames.map(d=>`#define HAS_UNIFORM_${d}`))}return t}getBinderAttributes(){const t=[];for(const i in this.binders){const l=this.binders[i];if(l instanceof _r||l instanceof ur)for(const d of l.paintVertexAttributes)t.push(d.name);else if(l instanceof Vr){const d=l.getVertexAttributes();for(const p of d)t.push(p.name)}}return t}getBinderUniforms(){const t=[];for(const i in this.binders){const l=this.binders[i];if(l instanceof ui||l instanceof Pi||l instanceof ur)for(const d of l.uniformNames)t.push(d)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,i){const l=[];for(const d in this.binders){const p=this.binders[d];if(p instanceof ui||p instanceof Pi||p instanceof ur){for(const g of p.uniformNames)if(i[g]){const y=p.getBinding(t,i[g],g);l.push({name:g,property:d,binding:y})}}}return l}setUniforms(t,i,l,d){for(const{name:p,property:g,binding:y}of i)this.binders[g].setUniform(y,d,l.get(g),p)}updatePaintBuffers(t){this._buffers=[];for(const i in this.binders){const l=this.binders[i];if(t&&l instanceof Vr){const d=t.fromScale===2?l.zoomInPaintVertexBuffer:l.zoomOutPaintVertexBuffer;d&&this._buffers.push(d)}else(l instanceof _r||l instanceof ur)&&l.paintVertexBuffer&&this._buffers.push(l.paintVertexBuffer)}}upload(t){for(const i in this.binders){const l=this.binders[i];(l instanceof _r||l instanceof ur||l instanceof Vr)&&l.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const i=this.binders[t];(i instanceof _r||i instanceof ur||i instanceof Vr)&&i.destroy()}}}class jo{constructor(t,i,l=()=>!0){this.programConfigurations={};for(const d of t)this.programConfigurations[d.id]=new Dd(d,i,l);this.needsUpload=!1,this._featureMap=new Tn,this._bufferOffset=0}populatePaintArrays(t,i,l,d){for(const p in this.programConfigurations)this.programConfigurations[p].populatePaintArrays(t,i,d);i.id!==void 0&&this._featureMap.add(i.id,l,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,i,l,d){for(const p of l)this.needsUpload=this.programConfigurations[p.id].updatePaintArrays(t,this._featureMap,i,p,d)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const i in this.programConfigurations)this.programConfigurations[i].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function Tf(o,t){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["ga
458pwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[o]||[o.replace(`${t}-`,"").replace(/-/g,"_")]}function Cy(o,t,i){const l={color:{source:Hc,composite:a},number:{source:Ad,composite:Hc}},d=function(p){return{"line-pattern":{source:fe,composite:fe},"fill-pattern":{source:fe,composite:fe},"fill-extrusion-pattern":{source:fe,composite:fe},"line-dasharray":{source:be,composite:be}}[p]}(o);return(d==null?void 0:d[i])||l[t][i]}ct("ConstantBinder",ui),ct("CrossFadedConstantBinder",Pi),ct("SourceExpressionBinder",_r),ct("CrossFadedPatternBinder",vr),ct("CrossFadedDasharrayBinder",la),ct("CompositeExpressionBinder",ur),ct("ProgramConfiguration",Dd,{omit:["_buffers"]}),ct("ProgramConfigurationSet",jo);const Ef=Math.pow(2,14)-1,ys=-Ef-1;function _s(o){const t=Pe/o.extent,i=o.loadGeometry();for(const l of i)for(const d of l){const p=Math.round(d.x*t),g=Math.round(d.y*t);d.x=Tt(p,ys,Ef),d.y=Tt(g,ys,Ef),(p<d.x||p>d.x+1||g<d.y||g>d.y+1)&&Nr("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return i}function vs(o,t){return{type:o.type,id:o.id,properties:o.properties,geometry:t?_s(o):[]}}const Pf=-32768;function Cf(o,t,i,l,d){o.emplaceBack(Pf+8*t+l,Pf+8*i+d)}class Ld{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new me,this.indexArray=new He,this.segments=new lt,this.programConfigurations=new jo(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,l){const d=this.layers[0],p=[];let g=null,y=!1,S=d.type==="heatmap";if(d.type==="circle"){const P=d;g=P.layout.get("circle-sort-key"),y=!g.isConstant(),S||(S=P.paint.get("circle-pitch-alignment")==="map")}const w=S?i.subdivisionGranularity.circle:1;
vendor: 11,528 bytes, line 458
458for(const{feature:P,id:T,index:D,sourceLayerIndex:I}of t){const N=this.layers[0]._featureFilter.needGeometry,B=vs(P,N);if(!this.layers[0]._featureFilter.filter(new or(this.zoom),B,l))continue;const q=y?g.evaluate(B,{},l):void 0,W={id:T,properties:P.properties,type:P.type,sourceLayerIndex:I,index:D,geometry:N?B.geometry:_s(P),patterns:{},sortKey:q};p.push(W)}y&&p.sort((P,T)=>P.sortKey-T.sortKey);for(const P of p){const{geometry:T,index:D,sourceLayerIndex:I}=P,N=t[D].feature;this.addFeature(P,T,D,l,w),i.featureIndex.insert(N,T,D,I,this.index)}}update(t,i,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:l})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ge),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,i,l,d,p=1){let g;switch(p){case 1:g=[0,7];break;case 3:g=[0,2,5,7];break;case 5:g=[0,1,3,4,6,7];break;case 7:g=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${p}; valid values are 1, 3, 5, 7.`)}const y=g.length;for(const S of i)for(const w of S){const P=w.x,T=w.y;if(P<0||P>=Pe||T<0||T>=Pe)continue;const D=this.segments.prepareSegment(y*y,this.layoutVertexArray,this.indexArray,t.sortKey),I=D.vertexLength;for(let N=0;N<y;N++)for(let B=0;B<y;B++)Cf(this.layoutVertexArray,P,T,g[B],g[N]);for(let N=0;N<y-1;N++)for(let B=0;B<y-1;B++){const q=I+N*y+B,W=I+(N+1)*y+B;this.indexArray.emplaceBack(q,W+1,q+1),this.indexArray.emplaceBack(q,W,W+1)}D.vertexLength+=y*y,D.primitiveLength+=(y-1)*(y-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:{},canonical:d})}}function zd(o,t){for(const i of o)if(Od(t,i))return!0;for(const i of t)if(Od(o,i))return!0;return lx(o,t)}function Iy(o,t,i){return!!Od(o,t)||cx(t,o,i)}function aT(o,t){if(o.length===1)return cT(t,o[0]);for(const i of t)for(const l of i)if(Od(o,l))return!0;for(const i of o)if(cT(t,i))return!0;for(const i of t)if(lx(o,i))return!0;return!1}function fO(o,t,i){if(o.length>1){if(lx(o,t))return!0;for(const l of t)if(cx(l,o,i))return!0}for(const l of o)if(cx(l,t,i))return!0;return!1}function lx(o,t){if(o.length===0||t.length===0)return!1;for(let i=0;i<o.length-1;i++){const l=o[i],d=o[i+1];for(let p=0;p<t.length-1;p++)if(mO(l,d,t[p],t[p+1]))return!0}return!1}function mO(o,t,i,l){return Ln(o,i,l)!==Ln(t,i,l)&&Ln(o,t,i)!==Ln(o,t,l)}function cx(o,t,i){const l=i*i;if(t.length===1)return o.distSqr(t[0])<l;for(let d=1;d<t.length;d++)if(lT(o,t[d-1],t[d])<l)return!0;return!1}function lT(o,t,i){const l=t.distSqr(i);if(l===0)return o.distSqr(t);const d=((o.x-t.x)*(i.x-t.x)+(o.y-t.y)*(i.y-t.y))/l;return o.distSqr(d<0?t:d>1?i:i.sub(t)._mult(d)._add(t))}function cT(o,t){let i,l,d,p=!1;for(const g of o){i=g;for(let y=0,S=i.length-1;y<i.length;S=y++)l=i[y],d=i[S],l.y>t.y!=d.y>t.y&&t.x<(d.x-l.x)*(t.y-l.y)/(d.y-l.y)+l.x&&(p=!p)}return p}function Od(o,t){let i=!1;for(let l=0,d=o.length-1;l<o.length;d=l++){const p=o[l],g=o[d];p.y>t.y!=g.y>t.y&&t.x<(g.x-p.x)*(t.y-p.y)/(g.y-p.y)+p.x&&(i=!i)}return i}function gO(o,t,i){const l=i[0],d=i[2];if(o.x<l.x&&t.x<l.x||o.x>d.x&&t.x>d.x||o.y<l.y&&t.y<l.y||o.y>d.y&&t.y>d.y)return!1;const p=Ln(o,t,i[0]);return p!==Ln(o,t,i[1])||p!==Ln(o,t,i[2])||p!==Ln(o,t,i[3])}function Fd(o,t,i){const l=t.paint.get(o).value;return l.kind==="constant"?l.value:i.programConfigurations.get(t.id).getMaxValue(o)}function My(o){return Math.sqrt(o[0]*o[0]+o[1]*o[1])}function Ay(o,t,i,l,d){if(!t[0]&&!t[1])return o;const p=A.convert(t)._mult(d);i==="viewport"&&p._rotate(-l);const g=[];for(const y of o)g.push(y.sub(p));return g}function yO(o){const t=[];for(let i=0;i<o.length;i++){const l=o[i],d=t.at(-1);(i===0||d&&!l.equals(d))&&t.push(l)}return t}function _O({queryGeometry:o,size:t},i){return Iy(o,i,t)}function vO({queryGeometry:o,size:t,transform:i,unwrappedTileID:l,getElevation:d},p){return Iy(o,p,t*(i.projectTileCoordinates(p.x,p.y,l,d).signedDistanceFromCamera/i.cameraToCenterDistance))}function xO({queryGeometry:o,size:t,transform:i,unwrappedTileID:l,getElevation:d},p){const g=i.projectTileCoordinates(p.x,p.y,l,d).signedDistanceFromCamera,y=t*(i.cameraToCenterDistance/g);return Iy(o,ux(p,i,l,d),y)}function bO({queryGeometry:o,size:t,transform:i,unwrappedTileID:l,getElevation:d},p){return Iy(o,ux(p,i,l,d),t)}function uT({queryGeometry:o,size:t,transform:i,unwrappedTileID:l,getElevation:d,pitchAlignment:p="map",pitchScale:g="map"},y){const S=p==="map"?g==="map"?_O:vO:g==="map"?xO:bO,w={queryGeometry:o,size:t,transform:i,unwrappedTileID:l,getElevation:d};for(const P of y)for(const T of P)if(S(w,T))return!0;return!1}function ux(o,t,i,l){const d=t.projectTileCoordinates(o.x,o.y,i,l).point;return new A((.5*d.x+.5)*t.width,(.5*-d.y+.5)*t.height)}let dT,hT;ct("CircleBucket",Ld,{omit:["layers"]});var wO={get paint(){return hT=hT||new Fn({"circle-radius":new vt(Ue.paint_circle["circle-radius"]),"circle-color":new vt(Ue.paint_circle["circle-color"]),"circle-blur":new vt(Ue.paint_circle["circle-blur"]),"circle-opacity":new vt(Ue.paint_circle["circle-opacity"]),"circle-translate":new ft(Ue.paint_circle["circle-translate"]),"circle-translate-anchor":new ft(Ue.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new ft(Ue.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new ft(Ue.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new vt(Ue.paint_circle["circle-stroke-width"]),"circle-stroke-color":new vt(Ue.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new vt(Ue.paint_circle["circle-stroke-opacity"])})},get layout(){return dT=dT||new Fn({"circle-sort-key":new vt(Ue.layout_circle["circle-sort-key"])})}};class SO extends Ei{constructor(t,i){super(t,wO,i)}createBucket(t){return new Ld(t)}queryRadius(t){const i=t;return Fd("circle-radius",this,i)+Fd("circle-stroke-width",this,i)+My(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:l,geometry:d,transform:p,pixelsToTileUnits:g,unwrappedTileID:y,getElevation:S}){const w=Ay(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-p.bearingInRadians,g),P=this.paint.get("circle-radius").evaluate(i,l)+this.paint.get("circle-stroke-width").evaluate(i,l),T=this.paint.get("circle-pitch-scale"),D=this.paint.get("circle-pitch-alignment");let I,N;return D==="map"?(I=w,N=P*g):(I=function(B,q,W,ee){return B.map(X=>ux(X,q,W,ee))}(w,p,y,S),N=P),uT({queryGeometry:I,size:N,transform:p,unwrappedTileID:y,getElevation:S,pitchAlignment:D,pitchScale:T},d)}}class pT extends Ld{}let fT;ct("HeatmapBucket",pT,{omit:["layers"]});var TO={get paint(){return fT=fT||new Fn({"heatmap-radius":new vt(Ue.paint_heatmap["heatmap-radius"]),"heatmap-weight":new vt(Ue.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ft(Ue.paint_heatmap["heatmap-intensity"]),"heatmap-color":new hl(Ue.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ft(Ue.paint_heatmap["heatmap-opacity"])})}};function dx(o,{width:t,height:i},l,d){if(d){if(d instanceof Uint8ClampedArray)d=new Uint8Array(d.buffer);else if(d.length!==t*i*l)throw new RangeError(`mismatched image size. expected: ${d.length} but got: ${t*i*l}`)}else d=new Uint8Array(t*i*l);return o.width=t,o.height=i,o.data=d,o}function mT(o,{width:t,height:i},l){if(t===o.width&&i===o.height)return;const d=dx({},{width:t,height:i},l);hx(o,d,{x:0,y:0},{x:0,y:0},{width:Math.min(o.width,t),height:Math.min(o.height,i)},l),o.width=t,o.height=i,o.data=d.data}function hx(o,t,i,l,d,p){if(d.width===0||d.height===0)return t;if(d.width>o.width||d.height>o.height||i.x>o.width-d.width||i.y>o.height-d.height)throw new RangeError("out of range source coordinates for image copy");if(d.width>t.width||d.height>t.height||l.x>t.width-d.width||l.y>t.height-d.height)throw new RangeError("out of range destination coordinates for image copy");const g=o.data,y=t.data;if(g===y)throw new Error("srcData equals dstData, so image is already copied");for(let S=0;S<d.height;S++){const w=((i.y+S)*o.width+i.x)*p,P=((l.y+S)*t.width+l.x)*p;for(let T=0;T<d.width*p;T++)y[P+T]=g[w+T]}return t}class If{constructor(t,i){dx(this,t,1,i)}resize(t){mT(this,t,1)}clone(){return new If({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,i,l,d,p){hx(t,i,l,d,p,1)}}class di{constructor(t,i){dx(this,t,4,i)}resize(t){mT(this,t,4)}replace(t,i){i?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new di({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,i,l,d,p){hx(t,i,l,d,p,4)}setPixel(t,i,l){const d=4*(t*this.width+i);this.data[d+0]=Math.round(255*l.r/l.a),this.data[d+1]=Math.round(255*l.g/l.a),this.data[d+2]=Math.round(255*l.b/l.a),this.data[d+3]=Math.round(255*l.a)}}function gT(o){const t=new Uint8Array(o.length);for(let i=0;i<o.length;i+=4){const l=o[i+3];t[i+0]=Math.round(o[i+0]*l/255),t[i+1]=Math.round(o[i+1]*l/255),t[i+2]=Math.round(o[i+2]*l/255),t[i+3]=l}return t}function yT(o){const t={},i=o.resolution||256,l=o.clips?o.clips.length:1,d=o.image||new di({width:i,height:l});if(Math.log(i)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${i}`);const p=(g,y,S)=>{t[o.evaluationKey]=S;const w=o.expression.evaluate(t);d.setPixel(g/4/i,y/4,w)};if(o.clips)for(let g=0,y=0;g<l;++g,y+=4*i)for(let S=0,w=0;S<i;S++,w+=4){const P=S/(i-1),{start:T,end:D}=o.clips[g];p(y,w,T*(1-P)+D*P)}else for(let g=0,y=0;g<i;g++,y+=4)p(0,y,g/(i-1));return d}ct("AlphaImage",If),ct("RGBAImage",di);const px="big-fb";class EO extends Ei{createBucket(t){return new pT(t)}constructor(t,i){super(t,TO,i),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){t==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=yT({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(px)&&this.heatmapFbos.delete(px)}queryRadius(t){return Fd("heatmap-radius",this,t)}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:l,geometry:d,transform:p,pixelsToTileUnits:g,unwrappedTileID:y,getElevation:S}){return uT({queryGeometry:t,size:this.paint.get("heatmap-radius").evaluate(i,l)*g,transform:p,unwrappedTileID:y,getElevation:S},d)}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&!this.isHidden()}}let _T;var PO={get paint(){return _T=_T||new Fn({"hillshade-illumination-direction":new ft(Ue.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new ft(Ue.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new ft(Ue.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new ft(Ue.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new ft(Ue.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new ft(Ue.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new ft(Ue.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new ft(Ue.paint_hillshade["hillshade-method"]),resampling:new ft(Ue.paint_hillshade.resampling)})}};
458class CO extends Ei{constructor(t,i){super(t,PO,i),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,i=this.paint.get("hillshade-illumination-altitude").values,l=this.paint.get("hillshade-highlight-color").values,d=this.paint.get("hillshade-shadow-color").values;const p=Math.max(t.length,i.length,l.length,d.length);t=t.concat(Array(p-t.length).fill(t.at(-1))),i=i.concat(Array(p-i.length).fill(i.at(-1))),l=l.concat(Array(p-l.length).fill(l.at(-1))),d=d.concat(Array(p-d.length).fill(d.at(-1)));const g=i.map(is);return{directionRadians:t.map(is),altitudeRadians:g,shadowColor:d,highlightColor:l}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&!this.isHidden()}}let vT;var IO={get paint(){return vT=vT||new Fn({"color-relief-opacity":new ft(Ue["paint_color-relief"]["color-relief-opacity"]),"color-relief-color":new hl(Ue["paint_color-relief"]["color-relief-color"]),resampling:new ft(Ue["paint_color-relief"].resampling)})}};function xT(o){return"data"in o}class fx{constructor(t,i,l,d){this.context=t,this.format=l,this.texture=t.gl.createTexture(),this._ownedHandle=this.texture,this.update(i,d)}update(t,i,l){var d;const{width:p,height:g}=t,y=(((d=this.size)===null||d===void 0?void 0:d[0])!==p||this.size[1]!==g)&&!l,{context:S}=this,{gl:w}=S;this.useMipmap=!!(i!=null&&i.useMipmap),w.bindTexture(w.TEXTURE_2D,this.texture),S.pixelStoreUnpackFlipY.set(!1),S.pixelStoreUnpack.set(1);const P=this.format===w.RGBA&&(i==null?void 0:i.premultiply)!==!1;if(y)this.size=[p,g],xT(t)?(S.pixelStoreUnpackPremultiplyAlpha.set(!1),this._uploadRawData(t,P,p,g,w)):(S.pixelStoreUnpackPremultiplyAlpha.set(P),this._uploadDomImage(t,w));else{const{x:T,y:D}=l||{x:0,y:0};xT(t)?(S.pixelStoreUnpackPremultiplyAlpha.set(!1),this._updateRawData(t,P,T,D,p,g,w)):(S.pixelStoreUnpackPremultiplyAlpha.set(P),this._updateDomImage(t,T,D,w))}this.useMipmap&&this.isSizePowerOfTwo()&&w.generateMipmap(w.TEXTURE_2D),S.pixelStoreUnpackFlipY.setDefault(),S.pixelStoreUnpack.setDefault(),S.pixelStoreUnpackPremultiplyAlpha.setDefault()}_uploadDomImage(t,i){i.texImage2D(i.TEXTURE_2D,0,this.format,this.format,i.UNSIGNED_BYTE,t)}_uploadRawData(t,i,l,d,p){let{data:g}=t;i&&g&&(g=gT(g)),p.texImage2D(p.TEXTURE_2D,0,this.format,l,d,0,this.format,p.UNSIGNED_BYTE,g)}_updateDomImage(t,i,l,d){d.texSubImage2D(d.TEXTURE_2D,0,i,l,d.RGBA,d.UNSIGNED_BYTE,t)}_updateRawData(t,i,l,d,p,g,y){let{data:S}=t;i&&S&&(S=gT(S)),y.texSubImage2D(y.TEXTURE_2D,0,l,d,p,g,y.RGBA,y.UNSIGNED_BYTE,S)}bind(t,i,l){const{context:d}=this,{gl:p}=d;this.texture!==this._ownedHandle&&(this.texture=this._ownedHandle),p.bindTexture(p.TEXTURE_2D,this.texture),l!==p.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(l=p.LINEAR),t!==this.filter&&(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,t),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,l||t),this.filter=t),i!==this.wrap&&(p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,i),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,i),this.wrap=i)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null,this._ownedHandle=null}}class bT{constructor(t,i,l,d=1,p=1,g=1,y=0){if(this.uid=t,i.height!==i.width)throw new RangeError("DEM tiles must be square");if(l&&!["mapbox","terrarium","custom"].includes(l))return void Nr(`"${l}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=i.height;const S=this.dim=i.height-2;switch(this.data=new Uint32Array(i.data.buffer),l){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=d,this.greenFactor=p,this.blueFactor=g,this.baseShift=y;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let w=0;w<S;w++)this.data[this._idx(-1,w)]=this.data[this._idx(0,w)],this.data[this._idx(S,w)]=this.data[this._idx(S-1,w)],this.data[this._idx(w,-1)]=this.data[this._idx(w,0)],this.data[this._idx(w,S)]=this.data[this._idx(w,S-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(S,-1)]=this.data[this._idx(S-1,0)],this.data[this._idx(-1,S)]=this.data[this._idx(0,S-1)],this.data[this._idx(S,S)]=this.data[this._idx(S-1,S-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let w=0;w<S;w++)for(let P=0;P<S;P++){const T=this.get(w,P);T>this.max&&(this.max=T),T<this.min&&(this.min=T)}}get(t,i){const l=new Uint8Array(this.data.buffer),d=4*this._idx(t,i);return this.unpack(l[d],l[d+1],l[d+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,i){if(t<-1||t>=this.dim+1||i<-1||i>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${t}, y: ${i}, dim: ${this.dim}`);return(i+1)*this.stride+(t+1)}unpack(t,i,l){return t*this.redFactor+i*this.greenFactor+l*this.blueFactor-this.baseShift}pack(t){return wT(t,this.getUnpackVector())}getPixels(){return new di({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,i,l){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let d=i*this.dim,p=i*this.dim+this.dim,g=l*this.dim,y=l*this.dim+this.dim;switch(i){case-1:d=p-1;break;case 1:p=d+1}switch(l){case-1:g=y-1;break;case 1:y=g+1}const S=-i*this.dim,w=-l*this.dim;for(let P=g;P<y;P++)for(let T=d;T<p;T++)this.data[this._idx(T,P)]=t.data[this._idx(T+S,P+w)]}}function wT(o,t){const i=t[0],l=t[1],d=t[2],p=t[3],g=Math.min(i,l,d),y=Math.round((o+p)/g);return{r:Math.floor(y*g/i)%256,g:Math.floor(y*g/l)%256,b:Math.floor(y*g/d)%256}}ct("DEMData",bT);
vendor: 4,984 bytes, line 458
458class MO extends Ei{constructor(t,i){super(t,IO,i)}_createColorRamp(t){const i={elevationStops:[],colorStops:[]},l=this._transitionablePaint._values["color-relief-color"].value.expression;if(l instanceof md&&l._styleExpression.expression instanceof Dr){this.colorRampExpression=l;const g=l._styleExpression.expression;i.elevationStops=g.labels,i.colorStops=[];for(const y of i.elevationStops)i.colorStops.push(g.evaluate({globals:{elevation:y}}))}if(i.elevationStops.length<1&&(i.elevationStops=[0],i.colorStops=[Rt.transparent]),i.elevationStops.length<2&&(i.elevationStops.push(i.elevationStops[0]+1),i.colorStops.push(i.colorStops[0])),i.elevationStops.length<=t)return i;const d={elevationStops:[],colorStops:[]},p=(i.elevationStops.length-1)/(t-1);for(let g=0;g<i.elevationStops.length-.5;g+=p)d.elevationStops.push(i.elevationStops[Math.round(g)]),d.colorStops.push(i.colorStops[Math.round(g)]);return Nr(`Too many colors in specification of ${this.id} color-relief layer, may not render properly. Max possible colors: ${t}, provided: ${i.elevationStops.length}`),d}_colorRampChanged(){return this.colorRampExpression!=this._transitionablePaint._values["color-relief-color"].value.expression}getColorRampTextures(t,i,l){if(this.colorRampTextures&&!this._colorRampChanged())return this.colorRampTextures;const d=this._createColorRamp(i),p=new di({width:d.colorStops.length,height:1}),g=new di({width:d.colorStops.length,height:1});for(let y=0;y<d.elevationStops.length;y++){const S=wT(d.elevationStops[y],l);g.setPixel(0,y,new Rt(S.r/255,S.g/255,S.b/255,1)),p.setPixel(0,y,d.colorStops[y])}return this.colorRampTextures={elevationTexture:new fx(t,g,t.gl.RGBA),colorTexture:new fx(t,p,t.gl.RGBA)},this.colorRampTextures}hasOffscreenPass(){return!this.isHidden()&&!!this.colorRampTextures}}const AO=ar([{name:"a_pos",components:2,type:"Int16"}],4),{members:RO}=AO;function Ry(o,t,i){const l=i.patternDependencies;let d=!1;for(const p of t){const g=p.paint.get(`${o}-pattern`);g.isConstant()||(d=!0);const y=g.constantOr(null);y&&(d=!0,l[y.to]=!0,l[y.from]=!0)}return d}function mx(o,t,i,l,d){const{zoom:p}=l,g=d.patternDependencies;for(const y of t){const S=y.paint.get(`${o}-pattern`).value;if(S.kind!=="constant"){let w=S.evaluate({zoom:p-1},i,{},d.availableImages),P=S.evaluate({zoom:p},i,{},d.availableImages),T=S.evaluate({zoom:p+1},i,{},d.availableImages);w=w!=null&&w.name?w.name:w,P=P!=null&&P.name?P.name:P,T=T!=null&&T.name?T.name:T,g[w]=!0,g[P]=!0,g[T]=!0,i.patterns[y.id]={min:w,mid:P,max:T}}}return i}function ST(o,t,i,l,d){let p;if(d===function(g,y,S,w){let P=0;for(let T=y,D=S-w;T<S;T+=w)P+=(g[D]-g[T])*(g[T+1]+g[D+1]),D=T;return P}(o,t,i,l)>0)for(let g=t;g<i;g+=l)p=CT(g/l|0,o[g],o[g+1],p);else for(let g=i-l;g>=t;g-=l)p=CT(g/l|0,o[g],o[g+1],p);return p&&jd(p,p.next)&&(kf(p),p=p.next),p}function Qc(o,t){if(!o)return o;t||(t=o);let i,l=o;do if(i=!1,l.steiner||!jd(l,l.next)&&zr(l.prev,l,l.next)!==0)l=l.next;else{if(kf(l),l=t=l.prev,l===l.next)break;i=!0}while(i||l!==t);return t}function Mf(o,t,i,l,d,p,g){if(!o)return;!g&&p&&function(S,w,P,T){let D=S;do D.z===0&&(D.z=gx(D.x,D.y,w,P,T)),D.prevZ=D.prev,D.nextZ=D.next,D=D.next;while(D!==S);D.prevZ.nextZ=null,D.prevZ=null,function(I){let N,B=1;do{let q,W=I;I=null;let ee=null;for(N=0;W;){N++;let X=W,te=0;for(let he=0;he<B&&(te++,X=X.nextZ,X);he++);let le=B;for(;te>0||le>0&&X;)te!==0&&(le===0||!X||W.z<=X.z)?(q=W,W=W.nextZ,te--):(q=X,X=X.nextZ,le--),ee?ee.nextZ=q:I=q,q.prevZ=ee,ee=q;W=X}ee.nextZ=null,B*=2}while(N>1)}(D)}(o,l,d,p);let y=o;for(;o.prev!==o.next;){const S=o.prev,w=o.next;if(p?DO(o,l,d,p):kO(o))t.push(S.i,o.i,w.i),kf(o),o=w.next,y=w.next;else if((o=w)===y){g?g===1?Mf(o=LO(Qc(o),t),t,i,l,d,p,2):g===2&&zO(o,t,i,l,d,p):Mf(Qc(o),t,i,l,d,p,1);break}}}function kO(o){const t=o.prev,i=o,l=o.next;if(zr(t,i,l)>=0)return!1;const d=t.x,p=i.x,g=l.x,y=t.y,S=i.y,w=l.y,P=Math.min(d,p,g),T=Math.min(y,S,w),D=Math.max(d,p,g),I=Math.max(y,S,w);let N=l.next;for(;N!==t;){if(N.x>=P&&N.x<=D&&N.y>=T&&N.y<=I&&Af(d,y,p,S,g,w,N.x,N.y)&&zr(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function DO(o,t,i,l){const d=o.prev,p=o,g=o.next;if(zr(d,p,g)>=0)return!1;const y=d.x,S=p.x,w=g.x,P=d.y,T=p.y,D=g.y,I=Math.min(y,S,w),N=Math.min(P,T,D),B=Math.max(y,S,w),q=Math.max(P,T,D),W=gx(I,N,t,i,l),ee=gx(B,q,t,i,l);let X=o.prevZ,te=o.nextZ;for(;X&&X.z>=W&&te&&te.z<=ee;){if(X.x>=I&&X.x<=B&&X.y>=N&&X.y<=q&&X!==d&&X!==g&&Af(y,P,S,T,w,D,X.x,X.y)&&zr(X.prev,X,X.next)>=0||(X=X.prevZ,te.x>=I&&te.x<=B&&te.y>=N&&te.y<=q&&te!==d&&te!==g&&Af(y,P,S,T,w,D,te.x,te.y)&&zr(te.prev,te,te.next)>=0))return!1;te=te.nextZ}for(;X&&X.z>=W;){if(X.x>=I&&X.x<=B&&X.y>=N&&X.y<=q&&X!==d&&X!==g&&Af(y,P,S,T,w,D,X.x,X.y)&&zr(X.prev,X,X.next)>=0)return!1;X=X.prevZ}for(;te&&te.z<=ee;){if(te.x>=I&&te.x<=B&&te.y>=N&&te.y<=q&&te!==d&&te!==g&&Af(y,P,S,T,w,D,te.x,te.y)&&zr(te.prev,te,te.next)>=0)return!1;te=te.nextZ}return!0}function LO(o,t){let i=o;do{const l=i.prev,d=i.next.next;!jd(l,d)&&ET(l,i,i.next,d)&&Rf(l,d)&&Rf(d,l)&&(t.push(l.i,i.i,d.i),kf
vendor: 1,189 bytes, line 458
458(i),kf(i.next),i=o=d),i=i.next}while(i!==o);return Qc(i)}function zO(o,t,i,l,d,p){let g=o;do{let y=g.next.next;for(;y!==g.prev;){if(g.i!==y.i&&BO(g,y)){let S=PT(g,y);return g=Qc(g,g.next),S=Qc(S,S.next),Mf(g,t,i,l,d,p,0),void Mf(S,t,i,l,d,p,0)}y=y.next}g=g.next}while(g!==o)}function OO(o,t){let i=o.x-t.x;return i===0&&(i=o.y-t.y,i===0)&&(i=(o.next.y-o.y)/(o.next.x-o.x)-(t.next.y-t.y)/(t.next.x-t.x)),i}function FO(o,t){const i=function(d,p){let g=p;const y=d.x,S=d.y;let w,P=-1/0;if(jd(d,g))return g;do{if(jd(d,g.next))return g.next;if(S<=g.y&&S>=g.next.y&&g.next.y!==g.y){const B=g.x+(S-g.y)*(g.next.x-g.x)/(g.next.y-g.y);if(B<=y&&B>P&&(P=B,w=g.x<g.next.x?g:g.next,B===y))return w}g=g.next}while(g!==p);if(!w)return null;const T=w,D=w.x,I=w.y;let N=1/0;g=w;do{if(y>=g.x&&g.x>=D&&y!==g.x&&TT(S<I?y:P,S,D,I,S<I?P:y,S,g.x,g.y)){const B=Math.abs(S-g.y)/(y-g.x);Rf(g,d)&&(B<N||B===N&&(g.x>w.x||g.x===w.x&&jO(w,g)))&&(w=g,N=B)}g=g.next}while(g!==T);return w}(o,t);if(!i)return t;const l=PT(i,o);return Qc(l,l.next),Qc(i,i.next)}function jO(o,t){return zr(o.prev,o,t.prev)<0&&zr(t.next,o,o.next)<0}function gx(o,t,i,l,d){return(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o=(o-i)*
vendor: 22,654 bytes, line 458
458d|0)|o<<8))|o<<4))|o<<2))|o<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-l)*d|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function NO(o){let t=o,i=o;do(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next;while(t!==o);return i}function TT(o,t,i,l,d,p,g,y){return(d-g)*(t-y)>=(o-g)*(p-y)&&(o-g)*(l-y)>=(i-g)*(t-y)&&(i-g)*(p-y)>=(d-g)*(l-y)}function Af(o,t,i,l,d,p,g,y){return!(o===g&&t===y)&&TT(o,t,i,l,d,p,g,y)}function BO(o,t){return o.next.i!==t.i&&o.prev.i!==t.i&&!function(i,l){let d=i;do{if(d.i!==i.i&&d.next.i!==i.i&&d.i!==l.i&&d.next.i!==l.i&&ET(d,d.next,i,l))return!0;d=d.next}while(d!==i);return!1}(o,t)&&(Rf(o,t)&&Rf(t,o)&&function(i,l){let d=i,p=!1;const g=(i.x+l.x)/2,y=(i.y+l.y)/2;do d.y>y!=d.next.y>y&&d.next.y!==d.y&&g<(d.next.x-d.x)*(y-d.y)/(d.next.y-d.y)+d.x&&(p=!p),d=d.next;while(d!==i);return p}(o,t)&&(zr(o.prev,o,t.prev)||zr(o,t.prev,t))||jd(o,t)&&zr(o.prev,o,o.next)>0&&zr(t.prev,t,t.next)>0)}function zr(o,t,i){return(t.y-o.y)*(i.x-t.x)-(t.x-o.x)*(i.y-t.y)}function jd(o,t){return o.x===t.x&&o.y===t.y}function ET(o,t,i,l){const d=Dy(zr(o,t,i)),p=Dy(zr(o,t,l)),g=Dy(zr(i,l,o)),y=Dy(zr(i,l,t));return d!==p&&g!==y||!(d!==0||!ky(o,i,t))||!(p!==0||!ky(o,l,t))||!(g!==0||!ky(i,o,l))||!(y!==0||!ky(i,t,l))}function ky(o,t,i){return t.x<=Math.max(o.x,i.x)&&t.x>=Math.min(o.x,i.x)&&t.y<=Math.max(o.y,i.y)&&t.y>=Math.min(o.y,i.y)}function Dy(o){return o>0?1:o<0?-1:0}function Rf(o,t){return zr(o.prev,o,o.next)<0?zr(o,t,o.next)>=0&&zr(o,o.prev,t)>=0:zr(o,t,o.prev)<0||zr(o,o.next,t)<0}function PT(o,t){const i=yx(o.i,o.x,o.y),l=yx(t.i,t.x,t.y),d=o.next,p=t.prev;return o.next=t,t.prev=o,i.next=d,d.prev=i,l.next=i,i.prev=l,p.next=l,l.prev=p,l}function CT(o,t,i,l){const d=yx(o,t,i);return l?(d.next=l.next,d.prev=l,l.next.prev=d,l.next=d):(d.prev=d,d.next=d),d}function kf(o){o.next.prev=o.prev,o.prev.next=o.next,o.prevZ&&(o.prevZ.nextZ=o.nextZ),o.nextZ&&(o.nextZ.prevZ=o.prevZ)}function yx(o,t,i){return{i:o,x:t,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Nd{constructor(t,i){if(i>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=i}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<<t)),this._minGranularity,1)}}class Ly{constructor(t){this.fill=t.fill,this.line=t.line,this.tile=t.tile,this.stencil=t.stencil,this.circle=t.circle}}Ly.noSubdivision=new Ly({fill:new Nd(0,0),line:new Nd(0,0),tile:new Nd(0,0),stencil:new Nd(0,0),circle:1}),ct("SubdivisionGranularityExpression",Nd),ct("SubdivisionGranularitySetting",Ly);const Bd=-32768,Df=32767;class VO{constructor(t,i){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=t,this._granularityCellSize=Pe/t,this._canonical=i}_getKey(t,i){return(t+=32768)<<16|i+32768}_vertexToIndex(t,i){if(t<-32768||i<-32768||t>32767||i>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const l=0|Math.round(t),d=0|Math.round(i),p=this._getKey(l,d);if(this._vertexDictionary.has(p))return this._vertexDictionary.get(p);const g=this._vertexBuffer.length/2;return this._vertexDictionary.set(p,g),this._vertexBuffer.push(l,d),g}_subdivideTrianglesScanline(t){if(this._granularity<2)return function(d,p){const g=[];for(let y=0;y<p.length;y+=3){const S=p[y],w=p[y+1],P=p[y+2],T=d[2*S],D=d[2*S+1];(d[2*w]-T)*(d[2*P+1]-D)-(d[2*w+1]-D)*(d[2*P]-T)>0?(g.push(S),g.push(P),g.push(w)):(g.push(S),g.push(w),g.push(P))}return g}(this._vertexBuffer,t);const i=[],l=t.length;for(let d=0;d<l;d+=3){const p=[t[d+0],t[d+1],t[d+2]],g=[this._vertexBuffer[2*t[d+0]+0],this._vertexBuffer[2*t[d+0]+1],this._vertexBuffer[2*t[d+1]+0],this._vertexBuffer[2*t[d+1]+1],this._vertexBuffer[2*t[d+2]+0],this._vertexBuffer[2*t[d+2]+1]];let y=1/0,S=1/0,w=-1/0,P=-1/0;for(let B=0;B<3;B++){const q=g[2*B],W=g[2*B+1];y=Math.min(y,q),w=Math.max(w,q),S=Math.min(S,W),P=Math.max(P,W)}if(y===w||S===P)continue;const T=Math.floor(y/this._granularityCellSize),D=Math.ceil(w/this._granularityCellSize),I=Math.floor(S/this._granularityCellSize),N=Math.ceil(P/this._granularityCellSize);if(T!==D||I!==N)for(let B=I;B<N;B++){const q=this._scanlineGenerateVertexRingForCellRow(B,g,p);UO(this._vertexBuffer,q,i)}else i.push(...p)}return i}_scanlineGenerateVertexRingForCellRow(t,i,l){const d=t*this._granularityCellSize,p=d+this._granularityCellSize,g=[];for(let y=0;y<3;y++){const S=i[2*y],w=i[2*y+1],P=i[2*(y+1)%6],T=i[(2*(y+1)+1)%6],D=i[2*(y+2)%6],I=i[(2*(y+2)+1)%6],N=P-S,B=T-w,q=N===0,W=B===0,ee=(d-w)/B,X=(p-w)/B,te=Math.min(ee,X),le=Math.max(ee,X);if(!W&&(te>=1||le<=0)||W&&(w<d||w>p)){T>=d&&T<=p&&g.push(l[(y+1)%3]);continue}!W&&te>0&&g.push(this._vertexToIndex(S+N*te,w+B*te));const he=S+N*Math.max(te,0),Se=S+N*Math.min(le,1);q||this._generateIntraEdgeVertices(g,S,w,P,T,he,Se),!W&&le<1&&g.push(this._vertexToIndex(S+N*le,w+B*le)),(W||T>=d&&T<=p)&&g.push(l[(y+1)%3]),!W&&(T<=d||T>=p)&&this._generateInterEdgeVertices(g,S,w,P,T,D,I,Se,d,p)}return g}_generateIntraEdgeVertices(t,i,l,d,p,g,y){const S=d-i,w=p-l,P=w===0,T=P?Math.min(i,d):Math.min(g,y),D=P?Math.max(i,d):Math.max(g,y),I=Math.floor(T/this._granularityCellSize)+1,N=Math.ceil(D/this._granularityCellSize)-1;if(P?i<d:g<y)for(let B=I;B<=N;B++){const q=B*this._granularityCellSize;t.push(this._vertexToIndex(q,l+w*(q-i)/S))}else for(let B=N;B>=I;B--){const q=B*this._granularityCellSize;t.push(this._vertexToIndex(q,l+w*(q-i)/S))}}_generateInterEdgeVertices(t,i,l,d,p,g,y,S,w,P){const T=p-l,D=g-d,I=y-p,N=(w-p)/I,B=(P-p)/I,q=Math.min(N,B),W=Math.max(N,B),ee=d+D*q;let X=Math.floor(Math.min(ee,S)/this._granularityCellSize)+1,te=Math.ceil(Math.max(ee,S)/this._granularityCellSize)-1,le=S<ee;const he=I===0;if(he&&(y===w||y===P))return;if(he||q>=1||W<=0){const Ee=l-y,Oe=g+(i-g)*Math.min((w-y)/Ee,(P-y)/Ee);X=Math.floor(Math.min(Oe,S)/this._granularityCellSize)+1,te=Math.ceil(Math.max(Oe,S)/this._granularityCellSize)-1,le=S<Oe}const Se=T>0?P:w;if(le)for(let Ee=X;Ee<=te;Ee++)t.push(this._vertexToIndex(Ee*this._granularityCellSize,Se));else for(let Ee=te;Ee>=X;Ee--)t.push(this._vertexToIndex(Ee*this._granularityCellSize,Se))}_generateOutline(t){const i=[];for(const l of t){const d=Jc(l,this._granularity,!0),p=this._pointArrayToIndices(d),g=[];for(let y=1;y<p.length;y++)g.push(p[y-1]),g.push(p[y]);i.push(g)}return i}_handlePoles(t){let i=!1,l=!1;this._canonical&&(this._canonical.y===0&&(i=!0),this._canonical.y===(1<<this._canonical.z)-1&&(l=!0)),(i||l)&&this._fillPoles(t,i,l)}_ensureNoPoleVertices(){const t=this._vertexBuffer;for(let i=0;i<t.length;i+=2){const l=t[i+1];l===Bd&&(t[i+1]=-32767),l===Df&&(t[i+1]=32766)}}_generatePoleQuad(t,i,l,d,p,g){d>p!=(g===Bd)?(t.push(i),t.push(l),t.push(this._vertexToIndex(d,g)),t.push(l),t.push(this._vertexToIndex(p,g)),t.push(this._vertexToIndex(d,g))):(t.push(l),t.push(i),t.push(this._vertexToIndex(d,g)),t.push(this._vertexToIndex(p,g)),t.push(l),t.push(this._vertexToIndex(d,g)))}_fillPoles(t,i,l){const d=this._vertexBuffer,p=Pe,g=t.length;for(let y=2;y<g;y+=3){const S=t[y-2],w=t[y-1],P=t[y],T=d[2*S],D=d[2*S+1],I=d[2*w],N=d[2*w+1],B=d[2*P],q=d[2*P+1];i&&(D===0&&N===0&&this._generatePoleQuad(t,S,w,T,I,Bd),N===0&&q===0&&this._generatePoleQuad(t,w,P,I,B,Bd),q===0&&D===0&&this._generatePoleQuad(t,P,S,B,T,Bd)),l&&(D===p&&N===p&&this._generatePoleQuad(t,S,w,T,I,Df),N===p&&q===p&&this._generatePoleQuad(t,w,P,I,B,Df),q===p&&D===p&&this._generatePoleQuad(t,P,S,B,T,Df))}}_initializeVertices(t){for(let i=0;i<t.length;i+=2)this._vertexToIndex(t[i],t[i+1])}subdividePolygonInternal(t,i){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:l,holeIndices:d}=function(y){const S=[],w=[];for(const P of y)if(P.length!==0){P!==y[0]&&S.push(w.length/2);for(const T of P)w.push(T.x),w.push(T.y)}return{flattened:w,holeIndices:S}}(t);let p;this._initializeVertices(l);try{const y=function(w,P,T=2){const D=P&&P.length,I=D?P[0]*T:w.length;let N=ST(w,0,I,T,!0);const B=[];if(!N||N.next===N.prev)return B;let q,W,ee;if(D&&(N=function(X,te,le,he){const Se=[];for(let Ee=0,Oe=te.length;Ee<Oe;Ee++){const ke=ST(X,te[Ee]*he,Ee<Oe-1?te[Ee+1]*he:X.length,he,!1);ke===ke.next&&(ke.steiner=!0),Se.push(NO(ke))}Se.sort(OO);for(let Ee=0;Ee<Se.length;Ee++)le=FO(Se[Ee],le);return le}(w,P,N,T)),w.length>80*T){q=w[0],W=w[1];let X=q,te=W;for(let le=T;le<I;le+=T){const he=w[le],Se=w[le+1];he<q&&(q=he),Se<W&&(W=Se),he>X&&(X=he),Se>te&&(te=Se)}ee=Math.max(X-q,te-W),ee=ee!==0?32767/ee:0}return Mf(N,B,T,q,W,ee,0),B}(l,d),S=this._convertIndices(l,y);p=this._subdivideTrianglesScanline(S)}catch(y){console.error(y)}let g=[];return i&&(g=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(p),{verticesFlattened:this._vertexBuffer,indicesTriangles:p,indicesLineList:g}}_convertIndices(t,i){const l=[];for(const d of i)l.push(this._vertexToIndex(t[2*d],t[2*d+1]));return l}_pointArrayToIndices(t){const i=[];for(const l of t)i.push(this._vertexToIndex(l.x,l.y));return i}}function IT(o,t,i,l=!0){return new VO(i,t).subdividePolygonInternal(o,l)}function Jc(o,t,i=!1){if(!o||o.length<1)return[];if(o.length<2)return[];const l=o[0],d=o[o.length-1],p=i&&(l.x!==d.x||l.y!==d.y);if(t<2)return p?[...o,o[0]]:[...o];const g=Math.floor(Pe/t),y=[];y.push(new A(o[0].x,o[0].y));const S=o.length,w=p?S:S-1;for(let P=0;P<w;P++){const T=o[P],D=P<S-1?o[P+1]:o[0],I=T.x,N=T.y,B=D.x,q=D.y,W=I!==B,ee=N!==q;if(!W&&!ee)continue;const X=B-I,te=q-N,le=Math.abs(X),he=Math.abs(te);let Se=I,Ee=N;for(;;){const ke=X>0?(Math.floor(Se/g)+1)*g:(Math.ceil(Se/g)-1)*g,Be=te>0?(Math.floor(Ee/g)+1)*g:(Math.ceil(Ee/g)-1)*g,Ve=Math.abs(Se-ke),Fe=Math.abs(Ee-Be),Le=Math.abs(Se-B),Ye=Math.abs(Ee-q),st=W?Ve/le:Number.POSITIVE_INFINITY,tt=ee?Fe/he:Number.POSITIVE_INFINITY;if((Le<=Ve||!W)&&(Ye<=Fe||!ee))break;if(st<tt&&W||!ee){Se=ke,Ee+=te*st;const Qe=new A(Se,Math.round(Ee));y[y.length-1].x===Qe.x&&y[y.length-1].y===Qe.y||y.push(Qe)}else{Se+=X*tt,Ee=Be;const Qe=new A(Math.round(Se),Ee);y[y.length-1].x===Qe.x&&y[y.length-1].y===Qe.y||y.push(Qe)}}const Oe=new A(B,q);y[y.length-1].x===Oe.x&&y[y.length-1].y===Oe.y||y.push(Oe)}return y}function UO(o,t,i){if(t.length===0)throw new Error("Subdivision vertex ring is empty.");let l=0,d=o[2*t[0]];for(let S=1;S<t.length;S++){const w=o[2*t[S]];w<d&&(d=w,l=S)}const p=t.length;let g=l,y=(g+1)%p;for(;;){const S=g-1>=0?g-1:p-1,w=(y+1)%p,P=o[2*t[S]],T=o[2*t[w]],D=o[2*t[g]],I=o[2*t[g]+1],N=o[2*t[y]+1];let B=!1;if(P<T)B=!0;else if(P>T)B=!1;else{const q=N-I,W=-(o[2*t[y]]-D),ee=I<N?1:-1;((P-D)*q+(o[2*t[S]+1]-I)*W)*ee>((T-D)*q+(o[2*t[w]+1]-I)*W)*ee&&(B=!0)}if(B){const q=t[S],W=t[g],ee=t[y];q!==W&&q!==ee&&W!==ee&&i.push(ee,W,q),g--,g<0&&(g=p-1)}else{const q=t[w],W=t[g],ee=t[y];q!==W&&q!==ee&&W!==ee&&i.push(ee,W,q),y++,y>=p&&(y=0)}if(S===w)break}}function MT(o,t,i,l,d,p,g,y,S){const w=d.length/2,P=g&&y&&S;if(w<lt.MAX_VERTEX_ARRAY_LENGTH){const T=t.prepareSegment(w,i,l),D=T.vertexLength;for(let B=0;B<p.length;B+=3)l.emplaceBack(D+p[B],D+p[B+1],D+p[B+2]);let I,N;T.vertexLength+=w,T.primitiveLength+=p.length/3,P&&(N=g.prepareSegment(w,i,y),I=N.vertexLength,N.vertexLength+=w);for(let B=0;B<d.length;B+=2)o(d[B],d[B+1]);if(P)for(const B of S){for(let q=1;q<B.length;q+=2)y.emplaceBack(I+B[q-1],I+B[q]);N.primitiveLength+=B.length/2}}else(function(T,D,I,N,B,q){const W=[];for(let he=0;he<N.length/2;he++)W.push(-1);const ee={count:0};let X=0,te=T.getOrCreateLatestSegment(D,I),le=te.vertexLength;for(let he=2;he<B.length;he+=3){const Se=B[he-2],Ee=B[he-1],Oe=B[he];let ke=W[Se]<X,Be=W[Ee]<X,Ve=W[Oe]<X;te.vertexLength+((ke?1:0)+(Be?1:0)+(Ve?1:0))>lt.MAX_VERTEX_ARRAY_LENGTH&&(te=T.createNewSegment(D,I),X=ee.count,ke=!0,Be=!0,Ve=!0,le=0);const Fe=Lf(W,N,q,ee,Se,ke,te),Le=Lf(W,N,q,ee,Ee,Be,te),Ye=Lf(W,N,q,ee,Oe,Ve,te);I.emplaceBack(le+Fe-X,le+Le-X,le+Ye-X),te.primitiveLength++}})(t,i,l,d,p,o),P&&function(T,D,I,N,B,q){const W=[];for(let he=0;he<N.length/2;he++)W.push(-1);const ee={count:0};let X=0,te=T.getOrCreateLatestSegment(D,I),le=te.vertexLength;for(const he of B)for(let Se=1;Se<he.length;Se+=2){const Ee=he[Se-1],Oe=he[Se];let ke=W[Ee]<X,Be=W[Oe]<X;te.vertexLength+((ke?1:0)+(Be?1:0))>lt.MAX_VERTEX_ARRAY_LENGTH&&(te=T.createNewSegment(D,I),X=ee.count,ke=!0,Be=!0,le=0);const Ve=Lf(W,N,q,ee,Ee,ke,te),Fe=Lf(W,N,q,ee,Oe,Be,te);I.emplaceBack(le+Ve-X,le+Fe-X),te.primitiveLength++}}(g,i,y,d,S,o),t.forceNewSegmentOnNextPrepare(),g==null||g.forceNewSegmentOnNextPrepare()}function Lf(o,t,i,l,d,p,g){if(p){const y=l.count;return i(t[2*d],t[2*d+1]),o[d]=l.count,l.count++,g.vertexLength++,y}return o[d]}class _x{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new pe,this.indexArray=new He,this.indexArray2=new pt,this.programConfigurations=new jo(t.layers,t.zoom),this.segments=new lt,this.segments2=new lt,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,l){this.hasDependencies=Ry("fill",this.layers,i);const d=this.layers[0].layout.get("fill-sort-key"),p=!d.isConstant(),g=[];for(const{feature:y,id:S,index:w,sourceLayerIndex:P}of t){const T=this.layers[0]._featureFilter.needGeometry,D=vs(y,T);if(!this.layers[0]._featureFilter.filter(new or(this.zoom),D,l))continue;const I=p?d.evaluate(D,{},l,i.availableImages):void 0,N={id:S,properties:y.properties,type:y.type,sourceLayerIndex:P,index:w,geometry:T?D.geometry:_s(y),patterns:{},sortKey:I};g.push(N)}p&&g.sort((y,S)=>y.sortKey-S.sortKey);for(const y of g){const{geometry:S,index:w,sourceLayerIndex:P}=y;if(this.hasDependencies){const T=mx("fill",this.layers,y,{zoom:this.zoom},i);this.patternFeatures.push(T)}else this.addFeature(y,S,w,l,{},i.subdivisionGranularity);i.featureIndex.insert(t[w].feature,S,w,P,this.index)}}update(t,i,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:l})}addFeatures(t,i,l){for(const d of this.patternFeatures)this.addFeature(d,d.geometry,d.index,i,l,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,RO),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(t,i,l,d,p,g){for(const y of od(i,500)){const S=IT(y,d,g.fill.getGranularityForZoomLevel(d.z)),w=this.layoutVertexArray;MT((P,T)=>{w.emplaceBack(P,T)},this.segments,this.layoutVertexArray,this.indexArray,S.verticesFlattened,S.indicesTriangles,this.segments2,this.indexArray2,S.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:p,canonical:d})}}let AT,RT;ct("FillBucket",_x,{omit:["layers","patternFeatures"]});var $O={get paint(){return RT=RT||new Fn({"fill-antialias":new ft(Ue.paint_fill["fill-antialias"]),"fill-opacity":new vt(Ue.paint_fill["fill-opacity"]),"fill-color":new vt(Ue.paint_fill["fill-color"]),"fill-outline-color":new vt(Ue.paint_fill["fill-outline-color"]),"fill-translate":new ft(Ue.paint_fill["fill-translate"]),"fill-translate-anchor":new ft(Ue.paint_fill["fill-translate-anchor"]),"fill-pattern":new hs(Ue.paint_fill["fill-pattern"])})},get layout(){return AT=AT||new Fn({"fill-sort-key":new vt(Ue.layout_fill["fill-sort-key"])})}};class GO extends Ei{constructor(t,i){super(t,$O,i)}recalculate(t,i){super.recalculate(t,i);const l=this.paint._values["fill-outline-color"];l.value.kind==="constant"&&l.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new _x(t)}queryRadius(){return My(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:i,transform:l,pixelsToTileUnits:d}){return aT(Ay(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-l.bearingInRadians,d),i)}isTileClipped(){return!0}}const qO=ar([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),WO=ar([{name:"a_centroid",components:2,type:"Int16"}],4),{members:ZO}=qO;class zf{constructor(t,i,l,d,p){this.properties={},this.extent=l,this.type=0,this.id=void 0,this._pbf=t,this._geometry=-1,this._keys=d,this._values=p,t.readFields(HO,this,i)}loadGeometry(){const t=this._pbf;t.pos=this._geometry;const i=t.readVarint()+t.pos,l=[];let d,p=1,g=0,y=0,S=0;for(;t.pos<i;){if(g<=0){const w=t.readVarint();p=7&w,g=w>>3}if(g--,p===1||p===2)y+=t.readSVarint(),S+=t.readSVarint(),p===1&&(d&&l.push(d),d=[]),d&&d.push(new A(y,S));else{if(p!==7)throw new Error(`unknown command ${p}`);d&&d.push(d[0].clone())}}return d&&l.push(d),l}bbox(){const t=this._pbf;t.pos=this._geometry;const i=t.readVarint()+t.pos;let l=1,d=0,p=0,g=0,y=1/0,S=-1/0,w=1/0,P=-1/0;for(;t.pos<i;){if(d<=0){const T=t.readVarint();l=7&T,d=T>>3}if(d--,l===1||l===2)p+=t.readSVarint(),g+=t.readSVarint(),p<y&&(y=p),p>S&&(S=p),g<w&&(w=g),g>P&&(P=g);else if(l!==7)throw new Error(`unknown command ${l}`)}return[y,w,S,P]}toGeoJSON(t,i,l){const d=this.extent*Math.pow(2,l),p=this.extent*t,g=this.extent*i,y=this.loadGeometry();function S(D){return[360*(D.x+p)/d-180,360/Math.PI*Math.atan(Math.exp((1-2*(D.y+g)/d)*Math.PI))-90]}function w(D){return D.map(S)}let P;if(this.type===1){const D=[];for(const N of y)D.push(N[0]);const I=w(D);P=D.length===1?{type:"Point",coordinates:I[0]}:{type:"MultiPoint",coordinates:I}}else if(this.type===2){const D=y.map(w);P=D.length===1?{type:"LineString",coordinates:D[0]}:{type:"MultiLineString",coordinates:D}}else{if(this.type!==3)throw new Error("unknown feature type");{const D=kT(y),I=[];for(const N of D)I.push(N.map(w));P=I.length===1?{type:"Polygon",coordinates:I[0]}:{type:"MultiPolygon",coordinates:I}}}const T={type:"Feature",geometry:P,properties:this.properties};return this.id!=null&&(T.id=this.id),T}}function HO(o,t,i){o===1?t.id=i.readVarint():o===2?function(l,d){const p=l.readVarint()+l.pos;for(;l.pos<p;){const g=d._keys[l.readVarint()],y=d._values[l.readVarint()];d.properties[g]=y}}(i,t):o===3?t.type=i.readVarint():o===4&&(t._geometry=i.pos)}function kT(o){const t=o.length;if(t<=1)return[o];const i=[];let l,d;for(let p=0;p<t;p++){const g=XO(o[p]);g!==0&&(d===void 0&&(d=g<0),d===g<0?(l&&i.push(l),l=[o[p]]):l&&l.push(o[p]))}return l&&i.push(l),i}function XO(o){let t=0;for(let i,l,d=0,p=o.length,g=p-1;d<p;g=d++)i=o[d],l=o[g],t+=(l.x-i.x)*(i.y+l.y);return t}zf.types=["Unknown","Point","LineString","Polygon"];class KO{constructor(t,i){this.version=1,this.name="",this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(YO,this,i),this.length=this._features.length}feature(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];const i=this._pbf.readVarint()+this._pbf.pos;return new zf(this._pbf,i,this.extent,this._keys,this._values)}}function YO(o,t,i){o===15?t.version=i.readVarint():o===1?t.name=i.readString():o===5?t.extent=i.readVarint():o===2?t._features.push(i.pos):o===3?t._keys.push(i.readString()):o===4&&t._values.push(function(l){let d=null;const p=l.readVarint()+l.pos;for(;l.pos<p;){const g=l.readVarint()>>3;d=g===1?l.readString():g===2?l.readFloat():g===3?l.readDouble():g===4?l.readVarint64():g===5?l.readVarint():g===6?l.readSVarint():g===7?l.readBoolean():null}if(d==null)throw new Error("unknown feature value");return d}(i))}class DT{constructor(t,i){this.layers=t.readFields(QO,{},i)}}function QO(o,t,i){if(o===3){const l=new KO(i,i.readVarint()+i.pos);l.length&&(t[l.name]=l)}}const vx=Math.pow(2,13);function Of(o,t,i,l,d,p,g,y){o.emplaceBack(t,i,2*Math.floor(l*vx)+g,d*vx*2,p*vx*2,Math.round(y))}class xx{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasDependencies=!1,this.layoutVertexArray=new ge,this.centroidVertexArray=new de,this.indexArray=new He,this.programConfigurations=new jo(t.layers,t.zoom),this.segments=new lt,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,l){this.features=[],this.hasDependencies=Ry("fill-extrusion",this.layers,i);for(const{feature:d,id:p,index:g,sourceLayerIndex:y}of t){const S=this.layers[0]._featureFilter.needGeometry,w=vs(d,S);if(!this.layers[0]._featureFilter.filter(new or(this.zoom),w,l))continue;const P={id:p,sourceLayerIndex:y,index:g,geometry:S?w.geometry:_s(d),properties:d.properties,type:d.type,patterns:{}};this.hasDependencies?this.features.push(mx("fill-extrusion",this.layers,P,{zoom:this.zoom},i)):this.addFeature(P,P.geometry,g,l,{},i.subdivisionGranularity),i.featureIndex.insert(d,P.geometry,g,y,this.index,!0)}}addFeatures(t,i,l){for(const d of this.features){const{geometry:p}=d;this.addFeature(d,p,d.index,i,l,t.subdivisionGranularity)}}update(t,i,l){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:l})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ZO),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,WO.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,i,l,d,p,g){for(const y of od(i,500)){const S={x:0,y:0,sampleCount:0},w=this.layoutVertexArray.length;this.processPolygon(S,d,t,y,g);const P=this.layoutVertexArray.length-w,T=Math.floor(S.x/S.sampleCount),D=Math.floor(S.y/S.sampleCount);for(let I=0;I<P;I++)this.centroidVertexArray.emplaceBack(T,D)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:p,canonical:d})}processPolygon(t,i,l,d,p){if(d.length<1||LT(d[0]))return;for(const T of d)T.length!==0&&JO(t,T);const g={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},y=p.fill.getGranularityForZoomLevel(i.z),S=zf.types[l.type]==="Polygon";
458for(const T of d){if(T.length===0||LT(T))continue;const D=Jc(T,y,S);this._generateSideFaces(D,g)}if(!S)return;const w=IT(d,i,y,!1),P=this.layoutVertexArray;MT((T,D)=>{Of(P,T,D,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,w.verticesFlattened,w.indicesTriangles)}_generateSideFaces(t,i){let l=0;for(let d=1;d<t.length;d++){const p=t[d],g=t[d-1];if(e5(p,g))continue;i.segment.vertexLength+4>lt.MAX_VERTEX_ARRAY_LENGTH&&(i.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const y=p.sub(g)._perp()._unit(),S=g.dist(p);l+S>32768&&(l=0),Of(this.layoutVertexArray,p.x,p.y,y.x,y.y,0,0,l),Of(this.layoutVertexArray,p.x,p.y,y.x,y.y,0,1,l),l+=S,Of(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,0,l),Of(this.layoutVertexArray,g.x,g.y,y.x,y.y,0,1,l);const w=i.segment.vertexLength;this.indexArray.emplaceBack(w,w+2,w+1),this.indexArray.emplaceBack(w+1,w+2,w+3),i.segment.vertexLength+=4,i.segment.primitiveLength+=2}}}function JO(o,t){for(let i=0;i<t.length;i++){const l=t[i];i===t.length-1&&t[0].x===l.x&&t[0].y===l.y||(o.x+=l.x,o.y+=l.y,o.sampleCount++)}}function e5(o,t){return o.x===t.x&&(o.x<0||o.x>Pe)||o.y===t.y&&(o.y<0||o.y>Pe)}function LT(o){return o.every(t=>t.x<0)||o.every(t=>t.x>Pe)||o.every(t=>t.y<0)||o.every(t=>t.y>Pe)}let zT;ct("FillExtrusionBucket",xx,{omit:["layers","features"]});var t5={get paint(){return zT=zT||new Fn({"fill-extrusion-opacity":new ft(Ue["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new vt(Ue["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ft(Ue["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ft(Ue["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new hs(Ue["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new vt(Ue["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new vt(Ue["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ft(Ue["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};
vendor: 3,726 bytes, line 458
458class r5 extends Ei{constructor(t,i){super(t,t5,i)}createBucket(t){return new xx(t)}queryRadius(){return My(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:l,geometry:d,transform:p,pixelsToTileUnits:g,pixelPosMatrix:y}){const S=Ay(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-p.bearingInRadians,g),w=this.paint.get("fill-extrusion-height").evaluate(i,l),P=this.paint.get("fill-extrusion-base").evaluate(i,l),T=function(I,N){const B=[];for(const q of I){const W=[q.x,q.y,0,1];$e(W,W,N),B.push(new A(W[0]/W[3],W[1]/W[3]))}return B}(S,y),D=function(I,N,B,q){const W=[],ee=[],X=q[8]*N,te=q[9]*N,le=q[10]*N,he=q[11]*N,Se=q[8]*B,Ee=q[9]*B,Oe=q[10]*B,ke=q[11]*B;for(const Be of I){const Ve=[],Fe=[];for(const Le of Be){const Ye=Le.x,st=Le.y,tt=q[0]*Ye+q[4]*st+q[12],Qe=q[1]*Ye+q[5]*st+q[13],wt=q[2]*Ye+q[6]*st+q[14],Vt=q[3]*Ye+q[7]*st+q[15],qt=wt+le,er=Vt+he,In=tt+Se,Tr=Qe+Ee,Hr=wt+Oe,tn=Vt+ke,pr=new A((tt+X)/er,(Qe+te)/er);pr.z=qt/er,Ve.push(pr);const fn=new A(In/tn,Tr/tn);fn.z=Hr/tn,Fe.push(fn)}W.push(Ve),ee.push(Fe)}return[W,ee]}(d,P,w,y);return function(I,N,B){let q=1/0;aT(B,N)&&(q=OT(B,N[0]));for(let W=0;W<N.length;W++){const ee=N[W],X=I[W];for(let te=0;te<ee.length-1;te++){const le=ee[te],he=[le,ee[te+1],X[te+1],X[te],le];zd(B,he)&&(q=Math.min(q,OT(B,he)))}}return q!==1/0&&q}(D[0],D[1],T)}}function Ff(o,t){return o.x*t.x+o.y*t.y}function OT(o,t){if(o.length===1){let i=0;const l=t[i++];let d;for(;!d||l.equals(d);)if(d=t[i++],!d)return 1/0;for(;i<t.length;i++){const p=t[i],g=o[0],y=d.sub(l),S=p.sub(l),w=g.sub(l),P=Ff(y,y),T=Ff(y,S),D=Ff(S,S),I=Ff(w,y),N=Ff(w,S),B=P*D-T*T,q=(D*I-T*N)/B,W=(P*N-T*I)/B,ee=l.z*(1-q-W)+d.z*q+p.z*W;if(isFinite(ee))return ee}return 1/0}{let i=1/0;for(const l of t)i=Math.min(i,l.z);return i}}const FT=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class zy{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[i,l]=new Uint8Array(t,0,2);if(i!==219)throw new Error("Data does not appear to be in a KDBush format.");const d=l>>4;if(d!==1)throw new Error(`Got v${d} data when expected v1.`);const p=FT[15&l];if(!p)throw new Error("Unrecognized array type.");const[g]=new Uint16Array(t,2,1),[y]=new Uint32Array(t,4,1);return new zy(y,g,p,t)}constructor(t,i=64,l=Float64Array,d){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+i,2),65535),this.ArrayType=l,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const p=FT.indexOf(this.ArrayType),g=2*t*this.ArrayType.BYTES_PER_ELEMENT,y=t*this.IndexArrayType.BYTES_PER_ELEMENT,S=(8-y%8)%8;if(p<0)throw new Error(`Unexpected typed array class: ${l}.`);d&&d instanceof ArrayBuffer?(this.data=d,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+y+S,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+g+y+S),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+y+S,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+p]),new Uint16Array(this.data,2,1)[0]=i,new Uint32Array(this.data,4,1)[0]=t)}add(t,i){const l=this._pos>>1;return this.ids[l]=l,this.coords[this._pos++]=t,this.coords[this._pos++]=i,l}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return bx(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,i,l,d){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");
458const{ids:p,coords:g,nodeSize:y}=this,S=[0,p.length-1,0],w=[];for(;S.length;){const P=S.pop()||0,T=S.pop()||0,D=S.pop()||0;if(T-D<=y){for(let q=D;q<=T;q++){const W=g[2*q],ee=g[2*q+1];W>=t&&W<=l&&ee>=i&&ee<=d&&w.push(p[q])}continue}const I=D+T>>1,N=g[2*I],B=g[2*I+1];N>=t&&N<=l&&B>=i&&B<=d&&w.push(p[I]),(P===0?t<=N:i<=B)&&(S.push(D),S.push(I-1),S.push(1-P)),(P===0?l>=N:d>=B)&&(S.push(I+1),S.push(T),S.push(1-P))}return w}within(t,i,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:d,coords:p,nodeSize:g}=this,y=[0,d.length-1,0],S=[],w=l*l;for(;y.length;){const P=y.pop()||0,T=y.pop()||0,D=y.pop()||0;if(T-D<=g){for(let q=D;q<=T;q++)NT(p[2*q],p[2*q+1],t,i)<=w&&S.push(d[q]);continue}const I=D+T>>1,N=p[2*I],B=p[2*I+1];NT(N,B,t,i)<=w&&S.push(d[I]),(P===0?t-l<=N:i-l<=B)&&(y.push(D),y.push(I-1),y.push(1-P)),(P===0?t+l>=N:i+l>=B)&&(y.push(I+1),y.push(T),y.push(1-P))}return S}}function bx(o,t,i,l,d,p){if(d-l<=i)return;const g=l+d>>1;jT(o,t,g,l,d,p),bx(o,t,i,l,g-1,1-p),bx(o,t,i,g+1,d,1-p)}function jT(o,t,i,l,d,p){for(;d>l;){if(d-l>600){const w=d-l+1,P=i-l+1,T=Math.log(w),D=.5*Math.exp(2*T/3),I=.5*Math.sqrt(T*D*(w-D)/w)*(P-w/2<0?-1:1);jT(o,t,i,Math.max(l,Math.floor(i-P*D/w+I)),Math.min(d,Math.floor(i+(w-P)*D/w+I)),p)}const g=t[2*i+p];let y=l,S=d;for(jf(o,t,l,i),t[2*d+p]>g&&jf(o,t,l,d);y<S;){for(jf(o,t,y,S),y++,S--;t[2*y+p]<g;)y++;for(;t[2*S+p]>g;)S--}t[2*l+p]===g?jf(o,t,l,S):(S++,jf(o,t,S,d)),S<=i&&(l=S+1),i<=S&&(d=S-1)}}function jf(o,t,i,l){wx(o,i,l),wx(t,2*i,2*l),wx(t,2*i+1,2*l+1)}function wx(o,t,i){const l=o[t];o[t]=o[i],o[i]=l}function NT(o,t,i,l){const d=o-i,p=t-l;return d*d+p*p}function Sx(o,t,i,l){let d=l;const p=t+(i-t>>1);let g,y=i-t;const S=o[t],w=o[t+1],P=o[i],T=o[i+1];for(let D=t+3;D<i;D+=3){const I=n5(o[D],o[D+1],S,w,P,T);if(I>d)g=D,d=I;else if(I===d){const N=Math.abs(D-p);N<y&&(g=D,y=N)}}d>l&&(g-t>3&&Sx(o,t,g,l),o[g+2]=d,i-g>3&&Sx(o,g,i,l))}function n5(o,t,i,l,d,p){let g=d-i,y=p-l;if(g!==0||y!==0){const S=((o-i)*g+(t-l)*y)/(g*g+y*y);S>1?(i=d,l=p):S>0&&(i+=g*S,l+=y*S)}return g=o-i,y=t-l,g*g+y*y}function pn(o,t,i,l){const d={type:t,geom:i},p={id:o??null,type:d.type,geometry:d.geom,tags:l,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(d.type){case"Point":case"MultiPoint":Nf(p,d.geom);break;case"LineString":Nf(p,d.geom.points);break;case"Polygon":Nf(p,d.geom[0].points);break;case"MultiLineString":for(const g of d.geom)Nf(p,g.points);break;case"MultiPolygon":for(const g of d.geom)Nf(p,g[0].points)}return p}function Tx(o){o.points.length>64&&(o.points=new Float64Array(o.points))}function Nf(o,t){for(let i=0;i<t.length;i+=3)o.minX=Math.min(o.minX,t[i]),o.minY=Math.min(o.minY,t[i+1]),o.maxX=Math.max(o.maxX,t[i]),o.maxY=Math.max(o.maxY,t[i+1])}function Ex(o,t){const i=[];switch(o.type){case"FeatureCollection":for(let l=0;l<o.features.length;l++)Oy(i,o.features[l],t,l);break;case"Feature":Oy(i,o,t);break;default:Oy(i,{geometry:o,properties:void 0},t)}return i}function Oy(o,t,i,l){if(!t.geometry)return;if(t.geometry.type==="GeometryCollection")return void function(y,S,w,P,T){for(const D of w.geometries)Oy(y,{id:S.id,geometry:D,properties:S.properties},P,T)}(o,t,t.geometry,i,l);const d=t.geometry.coordinates;if(!(d!=null&&d.length))return;const p=function(y,S,w){var P;return S.promoteId?(P=y.properties)==null?void 0:P[S.promoteId]:S.generateId?w||0:y.id}(t,i,l),g=Math.pow(i.tolerance/((1<<i.maxZoom)*i.extent),2);switch(t.geometry.type){case"Point":return void function(y,S,w,P){const T=[];T.push(Vd(w.coordinates[0]),Ud(w.coordinates[1]),0),y.push(pn(S,"Point",T,P))}(o,p,t.geometry,t.properties);case"MultiPoint":return void function(y,S,w,P){const T=[];for(const D of w.coordinates)T.push(Vd(D[0]),Ud(D[1]),0);y.push(pn(S,"MultiPoint",T,P))}(o,p,t.geometry,t.properties);case"LineString":return void function(y,S,w,P,T){const D={points:[]};Px(w.coordinates,D,P,!1),y.push(pn(S,"LineString",D,T))}(o,p,t.geometry,g,t.properties);case"MultiLineString":return void function(y,S,w,P,T,D){if(T.lineMetrics)for(const I of w.coordinates){const N={points:[]};Px(I,N,P,!1),y.push(pn(S,"LineString",N,D))}else{const I=[];Cx(w.coordinates,I,P,!1),y.push(pn(S,"MultiLineString",I,D))}}(o,p,t.geometry,g,i,t.properties);case"Polygon":return void function(y,S,w,P,T){const D=[];Cx(w.coordinates,D,P,!0),y.push(pn(S,"Polygon",D,T))}(o,p,t.geometry,g,t.properties);case"MultiPolygon":return void function(y,S,w,P,T){const D=[];for(const I of w.coordinates){const N=[];Cx(I,N,P,!0),D.push(N)}y.push(pn(S,"MultiPolygon",D,T))}(o,p,t.geometry,g,t.properties);default:throw new Error("Input data is not a valid GeoJSON object.")}}function Px(o,t,i,l){let d,p,g=0;for(let S=0;S<o.length;S++){const w=Vd(o[S][0]),P=Ud(o[S][1]);t.points.push(w,P,0),S>0&&(g+=l?(d*P-w*p)/2:Math.sqrt(Math.pow(w-d,2)+Math.pow(P-p,2))),d=w,p=P}const y=t.points.length-3;t.points[2]=1,i>
4580&&Sx(t.points,0,y,i),t.points[y+2]=1,Tx(t),t.size=Math.abs(g),t.start=0,t.end=t.size}function Cx(o,t,i,l){for(let d=0;d<o.length;d++){const p={points:[]};Px(o[d],p,i,l),t.push(p)}}function Vd(o){return o/360+.5}function Ud(o){const t=Math.sin(o*Math.PI/180),i=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return i<0?0:i>1?1:i}function Fy(o){const t={type:"Feature",geometry:i5(o),properties:o.tags};return o.id!=null&&(t.id=o.id),t}function i5(o){const{type:t,geometry:i}=o;switch(t){case"Point":return{type:t,coordinates:BT(i[0],i[1])};case"MultiPoint":return{type:t,coordinates:jy(i)};case"LineString":return{type:t,coordinates:jy(i.points)};case"MultiLineString":case"Polygon":return{type:t,coordinates:i.map(l=>jy(l.points))};case"MultiPolygon":return{type:t,coordinates:i.map(l=>l.map(d=>jy(d.points)))}}}function jy(o){const t=[];for(let i=0;i<o.length;i+=3)t.push(BT(o[i],o[i+1]));return t}function BT(o,t){return[VT(o),UT(t)]}function VT(o){return 360*(o-.5)}function UT(o){const t=(180-360*o)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}var Nn;function ca(o,t,i,l,d,p,g,y){if(l/=t,p>=(i/=t)&&g<l)return o;if(g<i||p>=l)return null;const S=[];for(const w of o){const P=d===Nn.X?w.minX:w.minY,T=d===Nn.X?w.maxX:w.maxY;if(P>=i&&T<l)S.push(w);else if(!(T<i||P>=l))switch(w.type){case"Point":case"MultiPoint":o5(w,S,i,l,d);continue;case"LineString":s5(w,S,i,l,d,y);continue;case"MultiLineString":a5(w,S,i,l,d);continue;case"Polygon":l5(w,S,i,l,d);continue;case"MultiPolygon":c5(w,S,i,l,d);continue}}return S.length?S:null}function o5(o,t,i,l,d){const p=[];(function(g,y,S,w,P){for(let T=0;T<g.length;T+=3){const D=g[T+P];D>=S&&D<=w&&$d(y,g[T],g[T+1],g[T+2])}})(o.geometry,p,i,l,d),p.length&&t.push(pn(o.id,p.length===3?"Point":"MultiPoint",p,o.tags))}function s5(o,t,i,l,d,p){const g=[];if($T(o.geometry,g,i,l,d,!1,p.lineMetrics),g.length)if(p.lineMetrics)for(const y of g)t.push(pn(o.id,"LineString",y,o.tags));else t.push(g.length>1?pn(o.id,"MultiLineString",g,o.tags):pn(o.id,"LineString",g[0],o.tags))}function a5(o,t,i,l,d){const p=[];Ix(o.geometry,p,i,l,d,!1),p.length&&t.push(p.length!==1?pn(o.id,"MultiLineString",p,o.tags):pn(o.id,"LineString",p[0],o.tags))}function l5(o,t,i,l,d){const p=[];Ix(o.geometry,p,i,l,d,!0),p.length&&t.push(pn(o.id,"Polygon",p,o.tags))}function c5(o,t,i,l,d){const p=[];for(const g of o.geometry){const y=[];Ix(g,y,i,l,d,!0),y.length&&p.push(y)}p.length&&t.push(pn(o.id,"MultiPolygon",p,o.tags))}function $T(o,t,i,l,d,p,g){let y=GT(o);const S=d===Nn.X?u5:d5;let w,P,T=o.start;for(let q=0;q<o.points.length-3;q+=3){const W=o.points[q],ee=o.points[q+1],X=o.points[q+2],te=o.points[q+3],le=o.points[q+4],he=d===Nn.X?W:ee,Se=d===Nn.X?te:le;let Ee=!1;g&&(w=Math.sqrt(Math.pow(W-te,2)+Math.pow(ee-le,2))),he<i?Se>i&&(P=S(y,W,ee,te,le,i),g&&(y.start=T+w*P)):he>l?Se<l&&(P=S(y,W,ee,te,le,l),g&&(y.start=T+w*P)):$d(y.points,W,ee,X),Se<i&&he>=i&&(P=S(y,W,ee,te,le,i),Ee=!0),Se>l&&he<=l&&(P=S(y,W,ee,te,le,l),Ee=!0),!p&&Ee&&(g&&(y.end=T+w*P),t.push(y),y=GT(o)),g&&(T+=w)}let D=o.points.length-3;const I=o.points[D],N=o.points[D+1],B=d===Nn.X?I:N;B>=i&&B<=l&&$d(y.points,I,N,o.points[D+2]),D=y.points.length-3,p&&D>=3&&(y.points[D]!==y.points[0]||y.points[D+1]!==y.points[1])&&$d(y.points,y.points[0],y.points[1],y.points[2]),y.points.length&&(Tx(y),t.push(y))}function GT(o){return{points:[],size:o.size,start:o.start,end:o.end}}function Ix(o,t,i,l,d,p){for(const g of o)$T(g,t,i,l,d,p,!1)}function $d(o,t,i,l){o.push(t,i,l)}function u5(o,t,i,l,d,p){const g=(p-t)/(l-t);return $d(o.points,p,i+(d-i)*g,1),g}function d5(o,t,i,l,d,p){const g=(p-i)/(d-i);return $d(o.points,t+(l-t)*g,p,1),g}function Mx(o,t){const i=t.buffer/t.extent;let l=o;const d=ca(o,1,-1-i,i,Nn.X,-1,2,t),p=ca(o,1,1-i,2+i,Nn.X,-1,2,t);return(d||p)&&(l=ca(o,1,-i,1+i,Nn.X,-1,2,t)||[],d&&(l=qT(d,1).concat(l)),p&&(l=l.concat(qT(p,-1)))),l}function qT(o,t){const i=[];for(const l of o)switch(l.type){case"Point":case"MultiPoint":{const d=h5(l.geometry,t);i.push(pn(l.id,l.type,d,l.tags));continue}case"LineString":{const d=Ax(l.geometry,t);i.push(pn(l.id,l.type,d,l.tags));continue}case"MultiLineString":case"Polygon":{const d=[];for(const p of l.geometry)d.push(Ax(p,t));i.push(pn(l.id,l.type,d,l.tags));continue}case"MultiPolygon":{const d=[];for(const p of l.geometry){const g=[];for(const y of p)g.push(Ax(y,t));d.push(g)}i.push(pn(l.id,l.type,d,l.tags));continue}}return i}function h5(o,t){const i=[];for(let l=0;l<o.length;l+=3)i.push(o[l]+t,o[l+1],o[l+2]);return i}function Ax(o,t){const i={points:[],size:o.size};o.start!==void 0&&(i.start=o.start,i.end=o.end);for(let l=0;l<o.points.length;l+=3)i.points.push(o.points[l]+t,o.points[l+1],o.points[l+2]);return Tx(i),i}function p5(o,t,i){var p,g;const l=!!t.newGeometry,d=t.removeAllProperties||((p=t.removeProperties)==null?void 0:p.length)>0||((g=t.addOrUpdateProperties)==null?void 0:g.length)>0;if(l){const y=o[0];let S=Ex({type:"FeatureCollection",features:[{type:"Feature",id:y.id,geometry:t.newGeometry,properties:d?WT(y.tags,t):y.tags}]},i);return S=Mx(S,i),S}if(d){const y=[];for(const S of o){const w={...S};w.tags=WT(w.tags,t),y.push(w)}return y}return o}function WT(o,t){if(t.removeAllProperties)return{};const i={...o||{}};if(t.removeProperties)for(const l of t.removeProperties)delete i[l];if(t.addOrUpdateProperties)for(const{key:l,value:d}of t.addOrUpdateProperties)i[l]=d;return i}(function(o){o[o.X=0]="X",o[o.Y=1]="Y"})(Nn||(Nn={}));const Rx={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:o=>o};class f5{constructor(t){this.options=Object.assign(Object.create(Rx),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(t){const i=[];for(const l of t){if(!l.geometry)continue;const[d,p]=l.geometry.coordinates,[g,y]=[Vd(d),Ud(p)];i.push({id:l.id,type:"Point",geometry:[g,y],tags:l.properties})}this.createIndex(i)}initialize(t){const i=[];for(const l of t)l.type==="Point"&&i.push(l);this.createIndex(i)}updateIndex(t,i,l){this.options=Object.assign(Object.create(Rx),l.clusterOptions),this.initialize(t)}createIndex(t){const{log:i,minZoom:l,maxZoom:d}=this.options;i&&console.time("total time");const p=`prepare ${t.length} points`;i&&console.time(p),this.points=t;const g=[];for(let S=0;S<t.length;S++){const w=t[S];if(!(w!=null&&w.geometry))continue;let[P,T]=w.geometry;P=Math.fround(P),T=Math.fround(T),g.push(P,T,1/0,S,-1,1),this.options.reduce&&g.push(0)}let y=this.trees[d+1]=this.createTree(g);i&&console.timeEnd(p);for(let S=d;S>=l;S--){const w=Date.now();y=this.trees[S]=this.createTree(this.cluster(y,S)),i&&console.log("z%d: %d clusters in %dms",S,y.numItems,Date.now()-w)}i&&console.timeEnd("total time")}getClusters(t,i){return this.getClustersInternal(t,i).map(l=>Fy(l))}getClustersInternal(t,i){let l=((t[0]+180)%360+360)%360-180;const d=Math.max(-90,Math.min(90,t[1]));let p=t[2]===180?180:((t[2]+180)%360+360)%360-180;const g=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)l=-180,p=180;else if(l>p){const T=this.getClustersInternal([l,d,180,g],i),D=this.getClustersInternal([-180,d,p,g],i);return T.concat(D)}const y=this.trees[this.limitZoom(i)],S=y.range(Vd(l),Ud(g),Vd(p),Ud(d)),w=y.flatData,P=[];for(const T of S){const D=this.stride*T;P.push(w[D+5]>1?m5(w,D,this.clusterProps):this.points[w[D+3]])}return P}getChildren(t){const i=this.getOriginId(t),l=this.getOriginZoom(t),d=new Error("No cluster with the specified id: "+t),p=this.trees[l];if(!p)throw d;const g=p.flatData;if(i*this.stride>=g.length)throw d;const y=this.options.radius/(this.options.extent*Math.pow(2,l-1)),S=p.within(g[i*this.stride],g[i*this.stride+1],y),w=[];for(const P of S){const T=P*this.stride;g[T+4]===t&&w.push(g[T+5]>1?g5(g,T,this.clusterProps):Fy(this.points[g[T+3]]))}if(w.length===0)throw d;return w}getLeaves(t,i,l){const d=[];return this.appendLeaves(d,t,i=i||10,l=l||0,0),d}getTile(t,i,l){const d=this.trees[this.limitZoom(t)];if(!d)return null;const p=Math.pow(2,t),{extent:g,radius:y}=this.options,S=y/g,w=(l-S)/p,P=(l+1+S)/p,T={transformed:!0,features:[],source:null,x:i,y:l,z:t};return this.addTileFeatures(d.range((i-S)/p,w,(i+1+S)/p,P),d.flatData,i,l,p,T),i===0&&this.addTileFeatures(d.range(1-S/p,w,1,P),d.flatData,p,l,p,T),i===p-1&&this.addTileFeatures(d.range(0,w,S/p,P),d.flatData,-1,l,p,T),T}getClusterExpansionZoom(t){return this.getOriginZoom(t)}appendLeaves(t,i,l,d,p){const g=this.getChildren(i);for(const y of g){const S=y.properties;if(S!=null&&S.cluster?p+S.point_count<=d?p+=S.point_count:p=this.appendLeaves(t,S.cluster_id,l,d,p):p<d?p++:t.push(y),t.length===l)break}return p}createTree(t){const i=new zy(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let l=0;l<t.length;l+=this.stride)i.add(t[l],t[l+1]);return i.finish(),i.flatData=t,i.data=null,i}addTileFeatures(t,i,l,d,p,g){for(const y of t){const S=y*this.stride,w=i[S+5]>1;let P,T,D;if(w)P=kx(i,S,this.clusterProps),T=i[S],D=i[S+1];else{const B=this.points[i[S+3]];P=B.tags,[T,D]=B.geometry}const I={type:1,geometry:[[Math.round(this.options.extent*(T*p-l)),Math.round(this.options.extent*(D*p-d))]],tags:P};let N;N=w||this.options.generateId?i[S+3]:this.points[i[S+3]].id,N!==void 0&&(I.id=N),g.features.push(I)}}limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}cluster(t,i){const{radius:l,extent:d,reduce:p,minPoints:g}=this.options,y=l/(d*Math.pow(2,i)),S=t.flatData,w=[],P=this.stride;for(let T=0;T<S.length;T+=P){if(S[T+2]<=i)continue;S[T+2]=i;const D=S[T],I=S[T+1],N=t.within(S[T],S[T+1],y),B=S[T+5];let q=B;for(const W of N){const ee=W*P;S[ee+2]>
vendor: 4,594 bytes, line 458
458i&&(q+=S[ee+5])}if(q>B&&q>=g){let W,ee=D*B,X=I*B,te=-1;const le=(T/P<<5)+(i+1)+this.points.length;for(const he of N){const Se=he*P;if(S[Se+2]<=i)continue;S[Se+2]=i;const Ee=S[Se+5];ee+=S[Se]*Ee,X+=S[Se+1]*Ee,S[Se+4]=le,p&&(W||(W=this.map(S,T,!0),te=this.clusterProps.length,this.clusterProps.push(W)),p(W,this.map(S,Se)))}S[T+4]=le,w.push(ee/q,X/q,1/0,le,-1,q),p&&w.push(te)}else{for(let W=0;W<P;W++)w.push(S[T+W]);if(q>1)for(const W of N){const ee=W*P;if(!(S[ee+2]<=i)){S[ee+2]=i;for(let X=0;X<P;X++)w.push(S[ee+X])}}}}return w}getOriginId(t){return t-this.points.length>>5}getOriginZoom(t){return(t-this.points.length)%32}map(t,i,l){if(t[i+5]>1){const g=this.clusterProps[t[i+6]];return l?Object.assign({},g):g}const d=this.points[t[i+3]].tags,p=this.options.map(d);return l&&p===d?Object.assign({},p):p}}function m5(o,t,i){return{id:o[t+3],type:"Point",tags:kx(o,t,i),geometry:[o[t],o[t+1]]}}function g5(o,t,i){return{type:"Feature",id:o[t+3],properties:kx(o,t,i),geometry:{type:"Point",coordinates:[VT(o[t]),UT(o[t+1])]}}}function kx(o,t,i){const l=o[t+5],d=l>=1e4?`${Math.round(l/1e3)}k`:l>=1e3?Math.round(l/100)/10+"k":l,p=o[t+6],g=p===-1?{}:Object.assign({},i[p]);return Object.assign(g,{cluster:!0,cluster_id:o[t+3],point_count:l,point_count_abbreviated:d})}const Dx="geojsonvt_clip_start",Lx="geojsonvt_clip_end";function ZT(o,t,i,l,d){const p=t===d.maxZoom?0:d.tolerance/((1<<t)*d.extent),g={transformed:!1,features:[],source:null,x:i,y:l,z:t,minX:2,minY:1,maxX:-1,maxY:0,numPoints:0,numSimplified:0,numFeatures:o.length};for(const y of o)y5(g,y,p,d);return g}function y5(o,t,i,l){switch(o.minX=Math.min(o.minX,t.minX),o.minY=Math.min(o.minY,t.minY),o.maxX=Math.max(o.maxX,t.maxX),o.maxY=Math.max(o.maxY,t.maxY),t.type){case"Point":case"MultiPoint":return void function(d,p){const g=[];for(let S=0;S<p.geometry.length;S+=3)g.push(p.geometry[S],p.geometry[S+1]),d.numPoints++,d.numSimplified++;if(!g.length)return;const y={type:1,tags:p.tags||null,geometry:g};p.id!==null&&(y.id=p.id),d.features.push(y)}(o,t);case"LineString":return void function(d,p,g,y){const S=[];if(zx(S,p.geometry,d,g,!1,!1),!S.length)return;let w=p.tags||null;if(y.lineMetrics){w={};for(const T in p.tags)w[T]=p.tags[T];w[Dx]=p.geometry.start/p.geometry.size,w[Lx]=p.geometry.end/p.geometry.size}const P={type:2,tags:w,geometry:S};p.id!==null&&(P.id=p.id),d.features.push(P)}(o,t,i,l);case"MultiLineString":case"Polygon":return void function(d,p,g){const y=[];for(let w=0;w<p.geometry.length;w++)zx(y,p.geometry[w],d,g,p.type==="Polygon",w===0);if(!y.length)return;const S={type:p.type==="Polygon"?3:2,tags:p.tags||null,geometry:y};p.id!==null&&(S.id=p.id),d.features.push(S)}(o,t,i);case"MultiPolygon":return void function(d,p,g){const y=[];for(let w=0;w<p.geometry.length;w++){const P=p.geometry[w];for(let T=0;T<P.length;T++)zx(y,P[T],d,g,!0,T===0)}if(!y.length)return;const S={type:3,tags:p.tags||null,geometry:y};p.id!==null&&(S.id=p.id),d.features.push(S)}(o,t,i)}}function zx(o,t,i,l,d,p){const g=l*l;if(l>0&&t.size<(d?g:l))return void(i.numPoints+=t.points.length/3);const y=[];for(let S=0;S<t.points.length;S+=3)(l===0||t.points[S+2]>g)&&(i.numSimplified++,y.push(t.points[S],t.points[S+1])),i.numPoints++;d&&function(S,w){let P=0;for(let T=0,D=S.length,I=D-2;T<D;I=T,T+=2)P+=(S[T]-S[I])*(S[T+1]+S[I+1]);if(P>0===w)for(let T=0,D=S.length;T<D/2;T+=2){const I=S[T],N=S[T+1];S[T]=S[D-2-T],S[T+1]=S[D-1-T],S[D-2-T]=I,S[D-1-T]=N}}(y,p),o.push(y)}function HT(o,t){if(o.transformed)return o;const i=1<<o.z,l=o.x,d=o.y;for(const p of o.features)p.type===1?_5(p,t,i,l,d):v5(p,t,i,l,d);return o.transformed=!0,o}function _5(o,t,i,l,d){const p=o,g=o.geometry,y=[];for(let S=0;S<g.length;S+=2)y.push(XT(g[S],g[S+1],t,i,l,d));return p.geometry=y,p}function v5(o,t,i,l,d){const p=o,g=o.geometry,y=[];for(const S of g){const w=[];for(let P=0;P<S.length;P+=2)w.push(XT(S[P],S[P+1],t,i,l,d));y.push(w)}return p.geometry=y,p}function XT(o,t,i,l,d,p){return[Math.round(i*(o*l-d)),Math.round(i*(t*l-p))]}class x5{constructor(t){this.options=t,this.total=0,this.stats={},this.tiles={},this.tileCoords=[],this.stats={},this.total=0}initialize(t){this.splitTile(t,0,0,0),this.options.debug&&(t.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}updateIndex(t,i,l){l.debug>1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(i),l.debug>1&&console.timeEnd("invalidating");const[d,p,g]=[0,0,0],y=ZT(t,d,p,g,l);y.source=t;const S=Ny(d,p,g);
458if(this.tiles[S]=y,this.tileCoords.push({z:d,x:p,y:g,id:S}),l.debug){const w=`z${d}`;this.stats[w]=(this.stats[w]||0)+1,this.total++}}getClusterExpansionZoom(t){return null}getChildren(t){return null}getLeaves(t,i,l){return null}getTile(t,i,l){const{extent:d,debug:p}=this.options,g=1<<t,y=Ny(t,i=i+g&g-1,l);if(this.tiles[y])return HT(this.tiles[y],d);p>1&&console.log("drilling down to z%d-%d-%d",t,i,l);let S,w=t,P=i,T=l;for(;!S&&w>0;)w--,P>>=1,T>>=1,S=this.tiles[Ny(w,P,T)];return S!=null&&S.source?(p>1&&(console.log("found parent tile z%d-%d-%d",w,P,T),console.time("drilling down")),this.splitTile(S.source,w,P,T,t,i,l),p>1&&console.timeEnd("drilling down"),this.tiles[y]?HT(this.tiles[y],d):null):null}splitTile(t,i,l,d,p,g,y){const S=[t,i,l,d],w=this.options,P=w.debug;for(;S.length;){d=S.pop(),l=S.pop(),i=S.pop(),t=S.pop();const T=1<<i,D=Ny(i,l,d);let I=this.tiles[D];if(!I&&(P>1&&console.time("creation"),I=this.tiles[D]=ZT(t,i,l,d,w),this.tileCoords.push({z:i,x:l,y:d,id:D}),P)){P>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",i,l,d,I.numFeatures,I.numPoints,I.numSimplified),console.timeEnd("creation"));const Ee=`z${i}`;this.stats[Ee]=(this.stats[Ee]||0)+1,this.total++}if(I.source=t,p==null){if(i===w.indexMaxZoom||I.numPoints<=w.indexMaxPoints)continue}else{if(i===w.maxZoom||i===p)continue;if(p!=null){const Ee=p-i;if(l!==g>>Ee||d!==y>>Ee)continue}}if(I.source=null,!t.length)continue;P>1&&console.time("clipping");const N=.5*w.buffer/w.extent,B=.5-N,q=.5+N,W=1+N;let ee=null,X=null,te=null,le=null;const he=ca(t,T,l-N,l+q,Nn.X,I.minX,I.maxX,w),Se=ca(t,T,l+B,l+W,Nn.X,I.minX,I.maxX,w);he&&(ee=ca(he,T,d-N,d+q,Nn.Y,I.minY,I.maxY,w),X=ca(he,T,d+B,d+W,Nn.Y,I.minY,I.maxY,w)),Se&&(te=ca(Se,T,d-N,d+q,Nn.Y,I.minY,I.maxY,w),le=ca(Se,T,d+B,d+W,Nn.Y,I.minY,I.maxY,w)),P>1&&console.timeEnd("clipping"),S.push(ee||[],i+1,2*l,2*d),S.push(X||[],i+1,2*l,2*d+1),S.push(te||[],i+1,2*l+1,2*d),S.push(le||[],i+1,2*l+1,2*d+1)}}invalidateTiles(t){if(!t.length)return;const i=this.options,{debug:l}=i;let d=1/0,p=-1/0,g=1/0,y=-1/0;for(const P of t)d=Math.min(d,P.minX),p=Math.max(p,P.maxX),g=Math.min(g,P.minY),y=Math.max(y,P.maxY);const S=i.buffer/i.extent,w=new Set;for(const P in this.tiles){const T=this.tiles[P],D=1<<T.z,I=(T.x-S)/D,N=(T.x+1+S)/D,B=(T.y-S)/D,q=(T.y+1+S)/D;if(p<I||d>=N||y<B||g>=q)continue;let W=!1;for(const ee of t)if(ee.maxX>=I&&ee.minX<N&&ee.maxY>=B&&ee.minY<q){W=!0;break}if(W){if(l){l>1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",T.z,T.x,T.y,T.numFeatures,T.numPoints,T.numSimplified);const ee=`z${T.z}`;this.stats[ee]=(this.stats[ee]||0)-1,this.total--}delete this.tiles[P],w.add(P)}}w.size&&(this.tileCoords=this.tileCoords.filter(P=>!w.has(P.id)))}}function Ny(o,t,i){return 32*((1<<o)*i+t)+o}const b5={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,updateable:!1,cluster:!1,clusterOptions:Rx,debug:0},w5=ar([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:S5}=w5,T5=ar([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:E5}=T5,P5=Math.cos(Math.PI/180*37.5),KT=Math.pow(2,14)/.5;class Ox{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(const i of this.layers)this.gradients[i.id]={};this.layoutVertexArray=new we,this.layoutVertexArray2=new ye,this.indexArray=new He,this.programConfigurations=new jo(t.layers,t.zoom),this.segments=new lt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,l){this.hasDependencies=Ry("line",this.layers,i)||this.hasLineDasharray(this.layers);const d=this.layers[0].layout.get("line-sort-key"),p=!d.isConstant(),g=[];for(const{feature:y,id:S,index:w,sourceLayerIndex:P}of t){const T=this.layers[0]._featureFilter.needGeometry,D=vs(y,T);if(!this.layers[0]._featureFilter.filter(new or(this.zoom),D,l))continue;const I=p?d.evaluate(D,{},l):void 0,N={id:S,properties:y.properties,type:y.type,sourceLayerIndex:P,index:w,geometry:T?D.geometry:_s(y),patterns:{},dashes:{},sortKey:I};g.push(N)}p&&g.sort((y,S)=>y.sortKey-S.sortKey);for(const y of g){const{geometry:S,index:w,sourceLayerIndex:P}=y;this.hasDependencies?(Ry("line",this.layers,i)?mx("line",this.layers,y,{zoom:this.zoom},i):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,y,this.zoom,i),this.patternFeatures.push(y)):this.addFeature(y,S,w,l,{},{},i.subdivisionGranularity),i.featureIndex.insert(t[w].feature,S,w,P,this.index)}}update(t,i,l,d){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,{imagePositions:l,dashPositions:d})}addFeatures(t,i,l,d){for(const p of this.patternFeatures)this.addFeature(p,p.geometry,p.index,i,l,d,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,E5)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,S5),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.hasOwn(t.properties,Dx)&&Object.hasOwn(t.properties,Lx))return{start:+t.properties[Dx],end:+t.properties[Lx]}}addFeature(t,i,l,d,p,g,y){const S=this.layers[0].layout,w=S.get("line-join").evaluate(t,{}),P=S.get("line-cap").evaluate(t,{}),T=S.get("line-miter-limit").evaluate(t,{}),D=S.get("line-round-limit").evaluate(t,{});this.lineClips=this.lineFeatureClips(t);for(const I of i)this.addLine(I,t,w,P,T,D,d,y);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,l,{imagePositions:p,dashPositions:g,canonical:d})}
vendor: 4,261 bytes, line 458
458addLine(t,i,l,d,p,g,y,S){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=Jc(t,y?S.line.getGranularityForZoomLevel(y.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let X=0;X<t.length-1;X++)this.totalDistance+=t[X].dist(t[X+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const w=zf.types[i.type]==="Polygon";let P=t.length;for(;P>=2&&t[P-1].equals(t[P-2]);)P--;let T=0;for(;T<P-1&&t[T].equals(t[T+1]);)T++;if(P<(w?3:2))return;l==="bevel"&&(p=1.05);const D=this.overscaling<=16?122880/(512*this.overscaling):0,I=this.segments.prepareSegment(10*P,this.layoutVertexArray,this.indexArray);let N,B,q,W,ee;this.e1=this.e2=-1,w&&(N=t[P-2],ee=t[T].sub(N)._unit()._perp());for(let X=T;X<P;X++){if(q=X===P-1?w?t[T+1]:void 0:t[X+1],q&&t[X].equals(q))continue;ee&&(W=ee),N&&(B=N),N=t[X],ee=q?q.sub(N)._unit()._perp():W,W||(W=ee);let te=W.add(ee);te.x===0&&te.y===0||te._unit();const le=W.x*ee.x+W.y*ee.y,he=te.x*ee.x+te.y*ee.y,Se=he!==0?1/he:1/0,Ee=2*Math.sqrt(2-2*he),Oe=he<P5&&B&&q,ke=W.x*ee.y-W.y*ee.x>0;if(Oe&&X>T){const Fe=N.dist(B);if(Fe>2*D){const Le=N.sub(N.sub(B)._mult(D/Fe)._round());this.updateDistance(B,Le),this.addCurrentVertex(Le,W,0,0,I),B=Le}}const Be=B&&q;let Ve=Be?l:w?"butt":d;if(Be&&Ve==="round"&&(Se<g?Ve="miter":Se<=2&&(Ve="fakeround")),Ve==="miter"&&Se>p&&(Ve="bevel"),Ve==="bevel"&&(Se>2&&(Ve="flipbevel"),Se<p&&(Ve="miter")),B&&this.updateDistance(B,N),Ve==="miter")te._mult(Se),this.addCurrentVertex(N,te,0,0,I);else if(Ve==="flipbevel"){if(Se>100)te=ee.mult(-1);else{const Fe=Se*W.add(ee).mag()/W.sub(ee).mag();te._perp()._mult(Fe*(ke?-1:1))}this.addCurrentVertex(N,te,0,0,I),this.addCurrentVertex(N,te.mult(-1),0,0,I)}else if(Ve==="bevel"||Ve==="fakeround"){const Fe=-Math.sqrt(Se*Se-1),Le=ke?Fe:0,Ye=ke?0:Fe;if(B&&this.addCurrentVertex(N,W,Le,Ye,I),Ve==="fakeround"){const st=Math.round(180*Ee/Math.PI/20);for(let tt=1;tt<st;tt++){let Qe=tt/st;if(Qe!==.5){const Vt=Qe-.5;Qe+=Qe*Vt*(Qe-1)*((1.0904+le*(le*(3.55645-1.43519*le)-3.2452))*Vt*Vt+(.848013+le*(.215638*le-1.06021)))}const wt=ee.sub(W)._mult(Qe)._add(W)._unit()._mult(ke?-1:1);this.addHalfVertex(N,wt.x,wt.y,!1,ke,0,I)}}q&&this.addCurrentVertex(N,ee,-Le,-Ye,I)}else if(Ve==="butt")this.addCurrentVertex(N,te,0,0,I);else if(Ve==="square"){const Fe=B?1:-1;this.addCurrentVertex(N,te,Fe,Fe,I)}else Ve==="round"&&(B&&(this.addCurrentVertex(N,W,0,0,I),this.addCurrentVertex(N,W,1,1,I,!0)),q&&(this.addCurrentVertex(N,ee,-1,-1,I,!0),this.addCurrentVertex(N,ee,0,0,I)));if(Oe&&X<P-1){const Fe=N.dist(q);if(Fe>2*D){const Le=N.add(q.sub(N)._mult(D/Fe)._round());this.updateDistance(N,Le),this.addCurrentVertex(Le,ee,0,0,I),N=Le}}}}addCurrentVertex(t,i,l,d,p,g=!1){const y=i.y*d-i.x,S=-i.y-i.x*d;this.addHalfVertex(t,i.x+i.y*l,i.y-i.x*l,g,!1,l,p),this.addHalfVertex(t,y,S,g,!0,-d,p),this.distance>KT/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,i,l,d,p,g))}addHalfVertex({x:t,y:i},l,d,p,g,y,S){const w=.5*(this.lineClips?this.scaledDistance*(KT-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(p?1:0),(i<<1)+(g?1:0),Math.round(63*l)+128,Math.round(63*d)+128,1+(y===0?0:y<0?-1:1)|(63&w)<<2,w>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const P=S.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,P,this.e2),S.primitiveLength++),g?this.e2=P:this.e1=P}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,i){this.distance+=t.dist(i),this.updateScaledDistance()}hasLineDasharray(t){for(const i of t){const l=i.paint.get("line-dasharray");if(l&&!l.isConstant())return!0}return!1}addLineDashDependencies(t,i,l,d){for(const p of t){const g=p.paint.get("line-dasharray");if(!g||g.value.kind==="constant")continue;const y=p.layout.get("line-cap").evaluate(i,{})==="round",S={dasharray:g.value.evaluate({zoom:l-1},i,{}),round:y},w={dasharray:g.value.evaluate({zoom:l},i,{}),round:y},P={dasharray:g.value.evaluate({zoom:l+1},i,{}),round:y},T=`${S.dasharray.join(",")}
458,${S.round}`,D=`${w.dasharray.join(",")},${w.round}`,I=`${P.dasharray.join(",")},${P.round}`;d.dashDependencies[T]=S,d.dashDependencies[D]=w,d.dashDependencies[I]=P,i.dashes[p.id]={min:T,mid:D,max:I}}}}let YT,QT;ct("LineBucket",Ox,{omit:["layers","patternFeatures"]});var JT={get paint(){return QT=QT||new Fn({"line-opacity":new vt(Ue.paint_line["line-opacity"]),"line-color":new vt(Ue.paint_line["line-color"]),"line-translate":new ft(Ue.paint_line["line-translate"]),"line-translate-anchor":new ft(Ue.paint_line["line-translate-anchor"]),"line-width":new vt(Ue.paint_line["line-width"]),"line-gap-width":new vt(Ue.paint_line["line-gap-width"]),"line-offset":new vt(Ue.paint_line["line-offset"]),"line-blur":new vt(Ue.paint_line["line-blur"]),"line-dasharray":new hs(Ue.paint_line["line-dasharray"]),"line-pattern":new hs(Ue.paint_line["line-pattern"]),"line-gradient":new hl(Ue.paint_line["line-gradient"])})},get layout(){return YT=YT||new Fn({"line-cap":new vt(Ue.layout_line["line-cap"]),"line-join":new vt(Ue.layout_line["line-join"]),"line-miter-limit":new vt(Ue.layout_line["line-miter-limit"]),"line-round-limit":new vt(Ue.layout_line["line-round-limit"]),"line-sort-key":new vt(Ue.layout_line["line-sort-key"])})}};class C5 extends vt{possiblyEvaluate(t,i){return i=new or(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),super.possiblyEvaluate(t,i)}evaluate(t,i,l,d){return i=zt({},i,{zoom:Math.floor(i.zoom)}),super.evaluate(t,i,l,d)}}let By;class I5 extends Ei{constructor(t,i){super(t,JT,i),this.gradientVersion=0,By||(By=new C5(JT.paint.properties["line-width"].specification),By.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const i=this.gradientExpression();this.stepInterpolant=!!function(l){return l._styleExpression!==void 0}(i)&&i._styleExpression.expression instanceof Ja,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,i){super.recalculate(t,i),this.paint._values["line-floorwidth"]=By.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new Ox(t)}queryRadius(t){const i=t,l=eE(Fd("line-width",this,i),Fd("line-gap-width",this,i)),d=Fd("line-offset",this,i);return l/2+Math.abs(d)+My(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:l,geometry:d,transform:p,pixelsToTileUnits:g}){const y=Ay(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-p.bearingInRadians,g),S=g/2*eE(this.paint.get("line-width").evaluate(i,l),this.paint.get("line-gap-width").evaluate(i,l)),w=this.paint.get("line-offset").evaluate(i,l);return w&&(d=function(P,T){const D=[];for(const I of P){const N=yO(I),B=[];for(let q=0;q<N.length;q++){const W=N[q],ee=N[q-1],X=N[q+1],te=q===0?new A(0,0):W.sub(ee)._unit()._perp(),le=q===N.length-1?new A(0,0):X.sub(W)._unit()._perp(),he=te._add(le)._unit(),Se=he.x*le.x+he.y*le.y;Se!==0&&he._mult(1/Se),B.push(he._mult(T)._add(W))}D.push(B)}return D}(d,w*g)),function(P,T,D){for(const I of T){if(P.length>=3){for(const N of I)if(Od(P,N))return!0}if(fO(P,I,D))return!0}return!1}(y,d,S)}isTileClipped(){return!0}}function eE(o,t){return t>0?t+2*o:o}const M5=ar([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),A5=ar([{name:"a_projected_pos",components:3,type:"Float32"}],4);ar([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const R5=ar([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ar([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const tE=ar([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),k5=ar([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function D5(o,t,i){const l=t.layout.get("text-transform").evaluate(i,{});return l==="uppercase"?o=o.toLocaleUpperCase():l==="lowercase"&&(o=o.toLocaleLowerCase()),zo.applyArabicShaping&&(o=zo.applyArabicShaping(o)),o}function L5(o,t,i){for(const l of o.sections)l.text=D5(l.text,t,i);return o}ar([{name:"triangle",components:3,type:"Uint16"}]),ar([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ar([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ar([{type:"Float32",name:"offsetX"}]),ar([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ar([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Jr=24;const Bf={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","⋯":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},z5={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},O5={40:!0};function rE(o,t,i,l,d,p){if("fontStack"in t){const g=i[t.fontStack],y=g==null?void 0:g[o];return y?y.metrics.advance*t.scale+d:0}{const g=l[t.imageName];return g?g.displaySize[0]*t.scale*Jr/p+d:0}}function nE(o,t,i,l){const d=Math.pow(o-t,2);return l?o<t?d/2:2*d:d+Math.abs(i)*i}function F5(o,t,i){let l=0;return o===10&&(l-=1e4),i&&(l+=150),o!==40&&o!==65288||(l+=50),t!==41&&t!==65289||(l+=50),l}function iE(o,t,i,l,d,p){let g=null,y=nE(t,i,d,p);for(const S of l){const w=nE(t-S.x,i,d,p)+S.badness;w<=y&&(g=S,y=w)}return{index:o,x:t,priorBreak:g,badness:y}}function oE(o){return o?oE(o.priorBreak).concat(o.index):[]}class Gd{constructor(t="",i=[],l=[]){this.text=t,this.sections=i,this.sectionIndex=l,this.imageSectionID=null}static fromFeature(t,i){const l=new Gd;for(const d of t.sections)d.image?l.addImageSection(d):l.addTextSection(d,i);return l}length(){return[...this.text].length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}verticalizePunctuation(){this.text=function(t){let i="",l={premature:!0,value:void 0};const d=t[Symbol.iterator]();let p=d.next();const g=t[Symbol.iterator]();g.next();let y=g.next();for(;!p.done;)i+=!y.done&&hf(y.value.codePointAt(0))&&!Bf[y.value]||!l.premature&&hf(l.value.codePointAt(0))&&!Bf[l.value]||!Bf[p.value]?p.value:Bf[p.value],l={value:p.value,premature:!1},p=d.next(),y=g.next();return i}(this.text)}hasZeroWidthSpaces(){return this.text.includes("​")}trim(){const t=this.text.match(/^\s*/),i=t?t[0].length:0,l=this.text.match(/\S\s*$/),d=l?l[0].length-1:0;this.text=this.text.substring(i,this.text.length-d),this.sectionIndex=this.sectionIndex.slice(i,this.sectionIndex.length-d)}substring(t,i){const l=[...this.text].slice(t,i).join(""),d=this.sectionIndex.slice(t,i);return new Gd(l,this.sections,d)}toCodeUnitIndex(t){return[...this.text].slice(0,t).join("").length}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,i)=>Math.max(t,this.sections[i].scale),0)}getMaxImageSize(t){let i=0,l=0;for(let d=0;d<this.length();d++){const p=this.getSection(d);if("imageName"in p){const g=t[p.imageName];if(!g)continue;const y=g.displaySize;i=Math.max(i,y[0]),l=Math.max(l,y[1])}}return{maxImageWidth:i,maxImageHeight:l}}addTextSection(t,i){this.text+=t.text,this.sections.push({scale:t.scale||1,verticalAlign:t.verticalAlign||"bottom",fontStack:t.fontStack||i});const l=this.sections.length-1;this.sectionIndex.push(...[...t.text].map(()=>l))}addImageSection(t){const i=t.image?t.image.name:"";if(i.length===0)return void Nr("Can't add FormattedSection with an empty image.");const l=this.getNextImageSectionCharCode();l?(this.text+=String.fromCharCode(l),this.sections.push({scale:1,verticalAlign:t.verticalAlign||"bottom",imageName:i}),this.sectionIndex.push(this.sections.length-1)):Nr("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(t,i,l,d,p){const g=[],y=this.determineAverageLineWidth(t,i,l,d,p),S=this.hasZeroWidthSpaces();let w=0,P=0;const T=this.text[Symbol.iterator]();let D=T.next();const I=this.text[Symbol.iterator]();I.next();let N=I.next();const B=this.text[Symbol.iterator]();B.next(),B.next();let q=B.next();for(;!D.done;){const W=this.getSection(P),ee=D.value.codePointAt(0);if(_y(ee)||(w+=rE(ee,W,l,d,t,p)),!N.done){const X=nx(ee),te=N.value.codePointAt(0);
458(z5[ee]||X||"imageName"in W||!q.done&&O5[te])&&g.push(iE(P+1,w,y,g,F5(ee,te,X&&S),!1))}P++,D=T.next(),N=I.next(),q=B.next()}return oE(iE(this.length(),w,y,g,0,!0))}determineAverageLineWidth(t,i,l,d,p){let g=0,y=0;for(const S of this.text){const w=this.getSection(y);g+=rE(S.codePointAt(0),w,l,d,t,p),y++}return g/Math.max(1,Math.ceil(g/i))}}const Fx=4294967296,sE=1/Fx,aE=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class Vy{constructor(t=new Uint8Array(16)){this.buf=ArrayBuffer.isView(t)?t:new Uint8Array(t),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(t,i,l=this.length){for(;this.pos<l;){const d=this.readVarint(),p=d>>3,g=this.pos;this.type=7&d,t(p,i,this),this.pos===g&&this.skip(d)}return i}readMessage(t,i){return this.readFields(t,i,this.readVarint()+this.pos)}readFixed32(){const t=this.dataView.getUint32(this.pos,!0);return this.pos+=4,t}readSFixed32(){const t=this.dataView.getInt32(this.pos,!0);return this.pos+=4,t}readFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*Fx;return this.pos+=8,t}readSFixed64(){const t=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*Fx;return this.pos+=8,t}readFloat(){const t=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,t}readDouble(){const t=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,t}readVarint(t){const i=this.buf;let l,d;return d=i[this.pos++],l=127&d,d<128?l:(d=i[this.pos++],l|=(127&d)<<7,d<128?l:(d=i[this.pos++],l|=(127&d)<<14,d<128?l:(d=i[this.pos++],l|=(127&d)<<21,d<128?l:(d=i[this.pos],l|=(15&d)<<28,function(p,g,y){const S=y.buf;let w,P;if(P=S[y.pos++],w=(112&P)>>4,P<128||(P=S[y.pos++],w|=(127&P)<<3,P<128)||(P=S[y.pos++],w|=(127&P)<<10,P<128)||(P=S[y.pos++],w|=(127&P)<<17,P<128)||(P=S[y.pos++],w|=(127&P)<<24,P<128)||(P=S[y.pos++],w|=(1&P)<<31,P<128))return qd(p,w,g);throw new Error("Expected varint not more than 10 bytes")}(l,t,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const t=this.readVarint();return t%2==1?(t+1)/-2:t/2}readBoolean(){return!!this.readVarint()}readString(){const t=this.readVarint()+this.pos,i=this.pos;return this.pos=t,t-i>=12&&aE?aE.decode(this.buf.subarray(i,t)):function(l,d,p){let g="",y=d;for(;y<p;){const S=l[y];let w,P,T,D=null,I=S>239?4:S>223?3:S>191?2:1;if(y+I>p)break;I===1?S<128&&(D=S):I===2?(w=l[y+1],(192&w)==128&&(D=(31&S)<<6|63&w,D<=127&&(D=null))):I===3?(w=l[y+1],P=l[y+2],(192&w)==128&&(192&P)==128&&(D=(15&S)<<12|(63&w)<<6|63&P,(
vendor: 7,947 bytes, line 458
458D<=2047||D>=55296&&D<=57343)&&(D=null))):I===4&&(w=l[y+1],P=l[y+2],T=l[y+3],(192&w)==128&&(192&P)==128&&(192&T)==128&&(D=(15&S)<<18|(63&w)<<12|(63&P)<<6|63&T,(D<=65535||D>=1114112)&&(D=null))),D===null?(D=65533,I=1):D>65535&&(D-=65536,g+=String.fromCharCode(D>>>10&1023|55296),D=56320|1023&D),g+=String.fromCharCode(D),y+=I}return g}(this.buf,i,t)}readBytes(){const t=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,t);return this.pos=t,i}readPackedVarint(t=[],i){const l=this.readPackedEnd();for(;this.pos<l;)t.push(this.readVarint(i));return t}readPackedSVarint(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readSVarint());return t}readPackedBoolean(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readBoolean());return t}readPackedFloat(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readFloat());return t}readPackedDouble(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readDouble());return t}readPackedFixed32(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readFixed32());return t}readPackedSFixed32(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readSFixed32());return t}readPackedFixed64(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readFixed64());return t}readPackedSFixed64(t=[]){const i=this.readPackedEnd();for(;this.pos<i;)t.push(this.readSFixed64());return t}readPackedEnd(){return this.type===2?this.readVarint()+this.pos:this.pos+1}skip(t){const i=7&t;if(i===0)for(;this.buf[this.pos++]>127;);else if(i===2)this.pos=this.readVarint()+this.pos;else if(i===5)this.pos+=4;else{if(i!==1)throw new Error(`Unimplemented type: ${i}`);this.pos+=8}}writeTag(t,i){this.writeVarint(t<<3|i)}realloc(t){let i=this.length||16;for(;i<this.pos+t;)i*=2;if(i!==this.length){const l=new Uint8Array(i);l.set(this.buf),this.buf=l,this.dataView=new DataView(l.buffer),this.length=i}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeSFixed32(t){this.realloc(4),this.dataView.setInt32(this.pos,t,!0),this.pos+=4}writeFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,-1&t,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*sE),!0),this.pos+=8}writeSFixed64(t){this.realloc(8),this.dataView.setInt32(this.pos,-1&t,!0),this.dataView.setInt32(this.pos+4,Math.floor(t*sE),!0),this.pos+=8}writeVarint(t){(t=+t||0)>268435455||t<0?function(i,l){let d,p;if(i>=0?(d=i%4294967296|0,p=i/4294967296|0):(d=~(-i%4294967296),p=~(-i/4294967296),4294967295^d?d=d+1|0:(d=0,p=p+1|0)),i>=18446744073709552e3||i<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");l.realloc(10),function(g,y,S){S.buf[S.pos++]=127&g|128,g>>>=7,S.buf[S.pos++]=127&g|128,g>>>=7,S.buf[S.pos++]=127&g|128,g>>>=7,S.buf[S.pos++]=127&g|128,S.buf[S.pos]=127&(g>>>=7)}(d,0,l),function(g,y){const S=(7&g)<<4;y.buf[y.pos++]|=S|((g>>>=3)?128:0),g&&(y.buf[y.pos++]=127&g|((g>>>=7)?128:0),g&&(y.buf[y.pos++]=127&g|((g>>>=7)?128:0),g&&(y.buf[y.pos++]=127&g|((g>>>=7)?128:0),g&&(y.buf[y.pos++]=127&g|((g>>>=7)?128:0),g&&(y.buf[y.pos++]=127&g)))))}(p,l)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))}writeSVarint(t){this.writeVarint(t<0?2*-t-1:2*t)}writeBoolean(t){this.writeVarint(+t)}writeString(t){t=String(t),this.realloc(4*t.length),this.pos++;const i=this.pos;this.pos=function(d,p,g){for(let y,S,w=0;w<p.length;w++){if(y=p.charCodeAt(w),y>55295&&y<57344){if(!S){y>56319||w+1===p.length?(d[g++]=239,d[g++]=191,d[g++]=189):S=y;continue}if(y<56320){d[g++]=239,d[g++]=191,d[g++]=189,S=y;continue}y=S-55296<<10|y-56320|65536,S=null}else S&&(d[g++]=239,d[g++]=191,d[g++]=189,S=null);y<128?d[g++]=y:(y<2048?d[g++]=y>>6|192:(y<65536?d[g++]=y>>12|224:(d[g++]=y>>18|240,d[g++]=y>>12&63|128),d[g++]=y>>6&63|128),d[g++]=63&y|128)}return g}(this.buf,t,this.pos);const l=this.pos-i;l>=128&&lE(i,l,this),this.pos=i-1,this.writeVarint(l),this.pos+=l}writeFloat(t){this.realloc(4),this.dataView.setFloat32(this.pos,t,!0),this.pos+=4}writeDouble(t){this.realloc(8),this.dataView.setFloat64(this.pos,t,!0),this.pos+=8}writeBytes(t){const i=t.length;this.writeVarint(i),this.realloc(i);for(let l=0;l<i;l++)this.buf[this.pos++]=t[l]}writeRawMessage(t,i){this.pos++;const l=this.pos;t(i,this);const d=this.pos-l;d>=128&&lE(l,d,this),this.pos=l-1,this.writeVarint(d),this.pos+=d}writeMessage(t,i,l){this.writeTag(t,2),this.writeRawMessage(i,l)}writePackedVarint(t,i){i.length&&this.writeMessage(t,j5,i)}writePackedSVarint(t,i){i.length&&this.writeMessage(t,N5,i)}writePackedBoolean(t,i){i.length&&this.writeMessage(t,U5,i)}writePackedFloat(t,i){i.length&&this.writeMessage(t,B5,i)}writePackedDouble(t,i){i.length&&this.writeMessage(t,V5,i)}writePackedFixed32(t,i){i.length&&this.writeMessage(t,$5,i)}writePackedSFixed32(t,i){i.length&&this.writeMessage(t,G5,i)}writePackedFixed64(t,i){i.length&&this.writeMessage(t,q5,i)}writePackedSFixed64(t,i){i.length&&this.writeMessage(t,W5,i)}writeBytesField(t,i){this.writeTag(t,2),this.writeBytes(i)}writeFixed32Field(t,i){this.writeTag(t,5),this.writeFixed32(i)}writeSFixed32Field(t,i){this.writeTag(t,5),this.writeSFixed32(i)}writeFixed64Field(t,i){this.writeTag(t,1),this.writeFixed64(i)}writeSFixed64Field(t,i){this.writeTag(t,1),this.writeSFixed64(i)}writeVarintField(t,i){this.writeTag(t,0),this.writeVarint(i)}writeSVarintField(t,i){this.writeTag(t,0),this.writeSVarint(i)}writeStringField(t,i){this.writeTag(t,2),this.writeString(i)}writeFloatField(t,i){this.writeTag(t,5),this.writeFloat(i)}writeDoubleField(t,i){this.writeTag(t,1),this.writeDouble(i)}writeBooleanField(t,i){this.writeVarintField(t,+i)}}function qd(o,t,i){return i?4294967296*t+(o>>>0):4294967296*(t>>>0)+(o>>>0)}function lE(o,t,i){const l=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));i.realloc(l);for(let d=i.pos-1;d>=o;d--)i.buf[d+l]=i.buf[d]}function j5(o,t){for(let i=0;i<o.length;i++)t.writeVarint(o[i])}function N5(o,t){for(let i=0;i<o.length;i++)t.writeSVarint(o[i])}function B5(o,t){for(let i=0;i<o.length;i++)t.writeFloat(o[i])}function V5(o,t){for(let i=0;i<o.length;i++)t.writeDouble(o[i])}function U5(o,t){for(let i=0;i<o.length;i++)t.writeBoolean(o[i])}function $5(o,t){for(let i=0;i<o.length;i++)t.writeFixed32(o[i])}function G5(o,t){for(let i=0;i<o.length;i++)t.writeSFixed32(o[i])}function q5(o,t){for(let i=0;i<o.length;i++)t.writeFixed64(o[i])}function W5(o,t){for(let i=0;i<o.length;i++)t.writeSFixed64(o[i])}function Z5(o,t,i){o===1&&i.readMessage(H5,t)}function H5(o,t,i){if(o===3){const{id:l,bitmap:d,width:p,height:g,left:y,top:S,advance:w}=i.readMessage(X5,{});t.push({id:l,bitmap:new If({width:p+6,height:g+6},d),metrics:{width:p,height:g,left:y,top:S,advance:w}})}}function X5(o,t,i){o===1?t.id=i.readVarint():o===2?t.bitmap=i.readBytes():o===3?t.width=i.readVarint():o===4?t.height=i.readVarint():o===5?t.left=i.readSVarint():o===6?t.top=i.readSVarint():o===7&&(t.advance=i.readVarint())}function cE(o){let t=0,i=0;for(const g of o)t+=g.w*g.h,i=Math.max(i,g.w);o.sort((g,y)=>y.h-g.h);const l=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}];let d=0,p=0;for(const g of o)for(let y=l.length-1;y>=0;y--){const S=l[y];if(!(g.w>S.w||g.h>S.h)){if(g.x=S.x,g.y=S.y,p=Math.max(p,g.y+g.h),d=Math.max(d,g.x+g.w),g.w===S.w&&g.h===S.h){const w=l.pop();w&&y<l.length&&(l[y]=w)}else g.h===S.h?(S.x+=g.w,S.w-=g.w):g.w===S.w?(S.y+=g.h,S.h-=g.h):(l.push({x:S.x+g.w,y:S.y,w:S.w-g.w,h:g.h}),S.y+=g.h,S.h-=g.h);break}}return{w:d,h:p,fill:t/(d*p)||0}}class jx{constructor(t,{pixelRatio:i,version:l,stretchX:d,stretchY:p,content:g,textFitWidth:y,textFitHeight:S}){this.paddedRect=t,this.pixelRatio=i,this.stretchX=d,this.stretchY=p,this.content=g,this.version=l,this.textFitWidth=y,this.textFitHeight=S}
458get tl(){return[this.paddedRect.x+1,this.paddedRect.y+1]}get br(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]}}class uE{constructor(t,i){const l={},d={};this.haveRenderCallbacks=[];const p=[];this.addImages(t,l,p),this.addImages(i,d,p);const{w:g,h:y}=cE(p),S=new di({width:g||1,height:y||1});for(const w in t){const P=t[w],T=l[w].paddedRect;di.copy(P.data,S,{x:0,y:0},{x:T.x+1,y:T.y+1},P.data)}for(const w in i){const P=i[w],T=d[w].paddedRect,D=T.x+1,I=T.y+1,N=P.data.width,B=P.data.height;di.copy(P.data,S,{x:0,y:0},{x:D,y:I},P.data),di.copy(P.data,S,{x:0,y:B-1},{x:D,y:I-1},{width:N,height:1}),di.copy(P.data,S,{x:0,y:0},{x:D,y:I+B},{width:N,height:1}),di.copy(P.data,S,{x:N-1,y:0},{x:D-1,y:I},{width:1,height:B}),di.copy(P.data,S,{x:0,y:0},{x:D+N,y:I},{width:1,height:B})}this.image=S,this.iconPositions=l,this.patternPositions=d}addImages(t,i,l){for(const d in t){const p=t[d],g={x:0,y:0,w:p.data.width+2,h:p.data.height+2};l.push(g),i[d]=new jx(g,p),p.hasRenderCallback&&this.haveRenderCallbacks.push(d)}}patchUpdatedImages(t,i){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const l in t.updatedImages)this.patchUpdatedImage(this.iconPositions[l],t.getImage(l),i),this.patchUpdatedImage(this.patternPositions[l],t.getImage(l),i)}patchUpdatedImage(t,i,l){if(!t||!i||t.version===i.version)return;t.version=i.version;const[d,p]=t.tl;l.update(i.data,void 0,{x:d,y:p})}}var fl;function Uy(o,t,i,l,d,p,g,y,S,w,P,T,D,I,N){const B=Gd.fromFeature(o,d);let q;T===v.ax.vertical&&B.verticalizePunctuation();let W=B.determineLineBreaks(w,p,t,l,I);const{processBidirectionalText:ee,processStyledBidirectionalText:X}=zo;if(ee&&B.sections.length===1){q=[],W=W.map(Se=>B.toCodeUnitIndex(Se));const he=ee(B.toString(),W);for(const Se of he){const Ee=[...Se].map(()=>0);q.push(new Gd(Se,B.sections,Ee))}}else if(X){q=[],W=W.map(Oe=>B.toCodeUnitIndex(Oe));let he=0;const Se=[];for(const Oe of B.text)Se.push(...Array(Oe.length).fill(B.sectionIndex[he])),he++;const Ee=X(B.text,Se,W);for(const Oe of Ee){const ke=[];let Be="";for(const Ve of Oe[0])ke.push(Oe[1][Be.length]),Be+=Ve;q.push(new Gd(Oe[0],B.sections,ke))}}else q=function(he,Se){const Ee=[];let Oe=0;for(const ke of Se)Ee.push(he.substring(Oe,ke)),Oe=ke;return Oe<he.length()&&Ee.push(he.substring(Oe,he.length())),Ee}(B,W);const te=[],le={positionedLines:te,text:B.toString(),top:P[1],bottom:P[1],left:P[0],right:P[0],writingMode:T,iconsInText:!1,verticalizable:!1};return function(he,Se,Ee,Oe,ke,Be,Ve,Fe,Le,Ye,st,tt){let Qe=0,wt=0,Vt=0,qt=0;const er=Fe==="right"?1:Fe==="left"?0:.5,In=Jr/tt;let Tr=0;for(const pr of ke){pr.trim();const fn=pr.getMaxScale(),Vn={positionedGlyphs:[],lineOffset:0};he.positionedLines[Tr]=Vn;const Un=Vn.positionedGlyphs;let hi=0;if(!pr.length()){wt+=Be,++Tr;continue}const Mn=K5(Oe,pr,In);let pi=0;for(const rn of pr.text){const xr=pr.getSection(pi),Ur=rn.codePointAt(0),Er=Y5(Le,st,Ur),nn={glyph:Ur,imageName:null,x:Qe,y:wt+-17,vertical:Er,scale:1,fontStack:"",sectionIndex:pr.getSectionIndex(pi),metrics:null,rect:null};let ha;if("fontStack"in xr){if(ha=Q5(xr,Ur,Er,Mn,Se,Ee),!ha)continue;nn.fontStack=xr.fontStack}else{if(he.iconsInText=!0,xr.scale*=In,ha=J5(xr,Er,fn,Mn,Oe),!ha)continue;hi=Math.max(hi,ha.imageOffset),nn.imageName=xr.imageName}const{rect:Vo,metrics:qf,baselineOffset:bl}=ha;nn.y+=bl,nn.scale=xr.scale,nn.metrics=qf,nn.rect=Vo,Un.push(nn),Er?(he.verticalizable=!0,Qe+=("imageName"in xr?qf.advance:Jr)*xr.scale+Ye):Qe+=qf.advance*xr.scale+Ye,pi++}Un.length!==0&&(Vt=Math.max(Qe-Ye,Vt),eF(Un,0,Un.length-1,er)),Qe=0,Vn.lineOffset=Math.max(hi,(fn-1)*Jr);const go=Be*fn+hi;wt+=go,qt=Math.max(go,qt),++Tr}const{horizontalAlign:Hr,verticalAlign:tn}=Nx(Ve);(function(pr,fn,Vn,Un,hi,Mn,pi,go,rn){const xr=(fn-Vn)*hi;let Ur=0;Ur=Mn!==pi?-go*Un- -17:-Un*rn*pi+.5*pi;for(const Er of pr)for(const nn of Er.positionedGlyphs)nn.x+=xr,nn.y+=Ur})(he.positionedLines,er,Hr,tn,Vt,qt,Be,wt,ke.length),he.top+=-tn*wt,he.bottom=he.top+wt,he.left+=-Hr*Vt,he.right=he.left+Vt}(le,t,i,l,q,g,y,S,T,w,D,N),!function(he){for(const Se of he)if(Se.positionedGlyphs.length!==0)return!1;return!0}(te)&&le}function Nx(o){let t=.5,i=.5;
vendor: 16,207 bytes, line 458
458switch(o){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(o){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function K5(o,t,i){const l=t.getMaxScale()*Jr,{maxImageWidth:d,maxImageHeight:p}=t.getMaxImageSize(o),g=Math.max(l,p*i);return{verticalLineContentWidth:Math.max(l,d*i),horizontalLineContentHeight:g}}function dE(o){switch(o){case"top":return 0;case"center":return .5;default:return 1}}function Y5(o,t,i){return!(o===v.ax.horizontal||!t&&!oa(i)||t&&(_y(i)||(l=i,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(l)))));var l}function Q5(o,t,i,l,d,p){const g=p[o.fontStack],y=function(w,P,T,D){if(w!=null&&w.rect)return w;const I=P[T.fontStack],N=I==null?void 0:I[D];return N?{rect:null,metrics:N.metrics}:null}(g==null?void 0:g[t],d,o,t);if(y===null)return null;let S;if(i)S=l.verticalLineContentWidth-o.scale*Jr;else{const w=dE(o.verticalAlign);S=(l.horizontalLineContentHeight-o.scale*Jr)*w}return{rect:y.rect,metrics:y.metrics,baselineOffset:S}}function J5(o,t,i,l,d){const p=d[o.imageName];if(!p)return null;const g=p.paddedRect,y=p.displaySize,S={width:y[0],height:y[1],left:1,top:-3,advance:t?y[1]:y[0]};let w;if(t)w=l.verticalLineContentWidth-y[1]*o.scale;else{const P=dE(o.verticalAlign);w=(l.horizontalLineContentHeight-y[1]*o.scale)*P}return{rect:g,metrics:S,baselineOffset:w,imageOffset:(t?y[0]:y[1])*o.scale-Jr*i}}function eF(o,t,i,l){if(l===0)return;const d=o[i],p=(o[i].x+d.metrics.advance*d.scale)*l;for(let g=t;g<=i;g++)o[g].x-=p}function tF(o,t,i){const{horizontalAlign:l,verticalAlign:d}=Nx(i),p=t[0]-o.displaySize[0]*l,g=t[1]-o.displaySize[1]*d;return{image:o,top:g,bottom:g+o.displaySize[1],left:p,right:p+o.displaySize[0]}}function hE(o){var t,i;let l=o.left,d=o.top,p=o.right-l,g=o.bottom-d;const y=(t=o.image.textFitWidth)!==null&&t!==void 0?t:"stretchOrShrink",S=(i=o.image.textFitHeight)!==null&&i!==void 0?i:"stretchOrShrink",w=(o.image.content[2]-o.image.content[0])/(o.image.content[3]-o.image.content[1]);if(S==="proportional"){if(y==="stretchOnly"&&p/g<w||y==="proportional"){const P=Math.ceil(g*w);l*=P/p,p=P}}else if(y==="proportional"&&S==="stretchOnly"&&w!==0&&p/g>w){const P=Math.ceil(p/w);d*=P/g,g=P}return{x1:l,y1:d,x2:l+p,y2:d+g}}function pE(o,t,i,l,d,p){const g=o.image;let y;if(g.content){const q=g.content,W=g.pixelRatio||1;y=[q[0]/W,q[1]/W,g.displaySize[0]-q[2]/W,g.displaySize[1]-q[3]/W]}const S=t.left*p,w=t.right*p;let P,T,D,I;i==="width"||i==="both"?(I=d[0]+S-l[3],T=d[0]+w+l[1]):(I=d[0]+(S+w-g.displaySize[0])/2,T=I+g.displaySize[0]);const N=t.top*p,B=t.bottom*p;return i==="height"||i==="both"?(P=d[1]+N-l[0],D=d[1]+B+l[2]):(P=d[1]+(N+B-g.displaySize[1])/2,D=P+g.displaySize[1]),{image:g,top:P,right:T,bottom:D,left:I,collisionPadding:y}}ct("ImagePosition",jx),ct("ImageAtlas",uE),v.ax=void 0,(fl=v.ax||(v.ax={}))[fl.none=0]="none",fl[fl.horizontal=1]="horizontal",fl[fl.vertical=2]="vertical",fl[fl.horizontalOnly=3]="horizontalOnly";const ua=128,ml=32640;function fE(o,t){const{expression:i}=t;if(i.kind==="constant")return{kind:"constant",layoutSize:i.evaluate(new or(o+1))};if(i.kind==="source")return{kind:"source"};{const{zoomStops:l,interpolationType:d}=i;let p=0;for(;p<l.length&&l[p]<=o;)p++;p=Math.max(0,p-1);let g=p;for(;g<l.length&&l[g]<o+1;)g++;g=Math.min(l.length-1,g);const y=l[p],S=l[g];return i.kind==="composite"?{kind:"composite",minZoom:y,maxZoom:S,interpolationType:d}:{kind:"camera",minZoom:y,maxZoom:S,minSize:i.evaluate(new or(y)),maxSize:i.evaluate(new or(S)),interpolationType:d}}}function Bx(o,t,i){let l="never";const d=o.get(t);return d?l=d:o.get(i)&&(l="always"),l}const rF=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function $y(o,t,i,l,d,p,g,y,S,w,P,T,D){const I=y?Math.min(ml,Math.round(y[0])):0,N=y?Math.min(ml,Math.round(y[1])):0;o.emplaceBack(t,i,Math.round(32*l),Math.round(32*d),p,g,(I<<1)+(S?1:0),N,16*w,16*P,256*T,256*D)}function Vx(o,t,i){o.emplaceBack(t.x,t.y,i),o.emplaceBack(t.x,t.y,i),o.emplaceBack(t.x,t.y,i),o.emplaceBack(t.x,t.y,i)}function nF(o){for(const t of o.sections)if(ff(t.text))return!0;return!1}class Ux{constructor(t){this.layoutVertexArray=new _e,this.indexArray=new He,this.programConfigurations=t,this.segments=new lt,this.dynamicLayoutVertexArray=new Ie,this.opacityVertexArray=new je,this.hasVisibleVertices=!1,this.placedSymbolArray=new E}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(t,i,l,d){this.isEmpty()||(l&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,M5.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,i),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,A5.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,rF,!0),this.opacityVertexBuffer.itemSize=1),(l||d)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}ct("SymbolBuffers",Ux);class $x{constructor(t,i,l){this.layoutVertexArray=new t,this.layoutAttributes=i,this.indexArray=new l,this.segments=new lt,this.collisionVertexArray=new Xe}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,R5.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}ct("CollisionBuffers",$x);class Wd{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(g=>g.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const i=this.layers[0]._unevaluatedLayout._values;this.textSizeData=fE(this.zoom,i["text-size"]),this.iconSizeData=fE(this.zoom,i["icon-size"]);const l=this.layers[0].layout,d=l.get("symbol-sort-key"),p=l.get("symbol-z-order");this.canOverlap=Bx(l,"text-overlap","text-allow-overlap")!=="never"||Bx(l,"icon-overlap","icon-allow-overlap")!=="never"||l.get("text-ignore-placement")||l.get("icon-ignore-placement"),this.sortFeaturesByKey=p!=="viewport-y"&&!d.isConstant(),this.sortFeaturesByY=(p==="viewport-y"||p==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,l.get("symbol-placement")==="point"&&(this.writingModes=l.get("text-writing-mode").map(g=>v.ax[g])),this.stateDependentLayerIds=this.layers.filter(g=>g.isStateDependent()).map(g=>g.id),this.sourceID=t.sourceID}createArrays(){this.text=new Ux(new jo(this.layers,this.zoom,t=>t.startsWith("text"))),this.icon=new Ux(new jo(this.layers,this.zoom,t=>t.startsWith("icon"))),this.glyphOffsetArray=new O,this.lineVertexArray=new F,this.symbolInstances=new k,this.textAnchorOffsets=new $}calculateGlyphDependencies(t,i,l,d,p){for(const g of t)if(i[g.codePointAt(0)]=!0,(l||d)&&p){const y=Bf[g];y&&(i[y.codePointAt(0)]=!0)}}populate(t,i,l){var d;const p=this.layers[0],g=p.layout,y=g.get("text-font"),S=g.get("text-field"),w=g.get("icon-image"),P=(S.value.kind!=="constant"||S.value.value instanceof Xn&&!S.value.value.isEmpty()||S.value.value.toString().length>0)&&(y.value.kind!=="constant"||y.value.value.length>0),T=w.value.kind!=="constant"||!!w.value.value||Object.keys(w.parameters).length>0,D=g.get("symbol-sort-key");if(this.features=[],!P&&!T)return;const I=i.iconDependencies,N=i.glyphDependencies,B=i.availableImages,q=new or(this.zoom);for(const{feature:W,id:ee,index:X,sourceLayerIndex:te}of t){const le=p._featureFilter.needGeometry,he=vs(W,le);if(!p._featureFilter.filter(q,he,l))continue;let Se,Ee;if(le||(he.geometry=_s(W)),P){const ke=p.getValueAndResolveTokens("text-field",he,l,B),Be=Xn.factory(ke);this.hasRTLText||(this.hasRTLText=nF(Be)),(!this.hasRTLText||zo.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&zo.isParsed())&&(Se=L5(Be,p,he))}if(T){const ke=p.getValueAndResolveTokens("icon-image",he,l,B);Ee=ke instanceof si?ke:si.fromString(ke)}if(!Se&&!Ee)continue;const Oe=this.sortFeaturesByKey?D.evaluate(he,{},l):void 0;if(this.features.push({id:ee,text:Se,icon:Ee,index:X,sourceLayerIndex:te,geometry:he.geometry,properties:W.properties,type:zf.types[W.type],sortKey:Oe}),Ee&&(I[Ee.name]=!0),Se){const ke=y.evaluate(he,{},l).join(","),Be=g.get("text-rotation-alignment")!=="viewport"&&g.get("symbol-placement")!=="point";this.allowVerticalPlacement=(d=this.writingModes)===null||d===void 0?void 0:d.includes(v.ax.vertical);for(const Ve of Se.sections)if(Ve.image)I[Ve.image.name]=!0;else{const Fe=uf(Se.toString()),Le=Ve.fontStack||ke;N[Le]||(N[Le]={}),this.calculateGlyphDependencies(Ve.text,N[Le],Be,this.allowVerticalPlacement,Fe)}}}g.get("symbol-placement")==="line"&&(this.features=function(W){const ee={},X={},te=[];let le=0;function he(ke){te.push(W[ke]),le++}function Se(ke,Be,Ve){const Fe=X[ke];return delete X[ke],X[Be]=Fe,te[Fe].geometry[0].pop(),te[Fe].geometry[0]=te[Fe].geometry[0].concat(Ve[0]),Fe}function Ee(ke,Be,Ve){const Fe=ee[Be];return delete ee[Be],ee[ke]=Fe,te[Fe].geometry[0].shift(),te[Fe].geometry[0]=Ve[0].concat(te[Fe].geometry[0]),Fe}function Oe(ke,Be,Ve){const Fe=Ve?Be[0][Be[0].length-1]:Be[0][0];return`${ke}:${Fe.x}:${Fe.y}`}for(let ke=0;ke<W.length;ke++){const Be=W[ke],Ve=Be.geometry,Fe=Be.text?Be.text.toString():null;if(!Fe){he(ke);continue}const Le=Oe(Fe,Ve),Ye=Oe(Fe,Ve,!0);if(Le in X&&Ye in ee&&X[Le]!==ee[Ye]){const st=Ee(Le,Ye,Ve),tt=Se(Le,Ye,te[st].geometry);delete ee[Le],delete X[Ye],X[Oe(Fe,te[tt].geometry,!0)]=tt,te[st].geometry=null}else Le in X?Se(Le,Ye,Ve):Ye in ee?Ee(Le,Ye,Ve):(he(ke),ee[Le]=le-1,X[Ye]=le-1)}return te.filter(ke=>ke.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((W,ee)=>W.sortKey-ee.sortKey)}update(t,i,l){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,i,this.layers,{imagePositions:l}),this.icon.programConfigurations.updatePaintArrays(t,i,this.layers,{imagePositions:l}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(t,i){const l=this.lineVertexArray.length;if(t.segment!==void 0){let d=t.dist(i[t.segment+1]),p=t.dist(i[t.segment]);const g={};for(let y=t.segment+1;y<i.length;y++)g[y]={x:i[y].x,y:i[y].y,tileUnitDistanceFromAnchor:d},y<i.length-1&&(d+=i[y+1].dist(i[y]));for(let y=t.segment||0;y>=0;y--)g[y]={x:i[y].x,y:i[y].y,tileUnitDistanceFromAnchor:p},y>0&&(p+=i[y-1].dist(i[y]));for(let y=0;y<i.length;y++){const S=g[y];this.lineVertexArray.emplaceBack(S.x,S.y,S.tileUnitDistanceFromAnchor)}}return{lineStartIndex:l,lineLength:this.lineVertexArray.length-l}}addSymbols(t,i,l,d,p,g,y,S,w,P,T,D){const I=t.indexArray,N=t.layoutVertexArray,B=t.segments.prepareSegment(4*i.length,N,I,this.canOverlap?g.sortKey:void 0),q=this.glyphOffsetArray.length,W=B.vertexLength,ee=this.allowVerticalPlacement&&y===v.ax.vertical?Math.PI/2:0,X=g.text&&g.text.sections;for(let te=0;te<i.length;te++){const{tl:le,tr:he,bl:Se,br:Ee,tex:Oe,pixelOffsetTL:ke,pixelOffsetBR:Be,minFontScaleX:Ve,minFontScaleY:Fe,glyphOffset:Le,isSDF:Ye,sectionIndex:st}=i[te],tt=B.vertexLength,Qe=Le[1];$y(N,S.x,S.y,le.x,Qe+le.y,Oe.x,Oe.y,l,Ye,ke.x,ke.y,Ve,Fe),$y(N,S.x,S.y,he.x,Qe+he.y,Oe.x+Oe.w,Oe.y,l,Ye,Be.x,ke.y,Ve,Fe),$y(N,S.x,S.y,Se.x,Qe+Se.y,Oe.x,Oe.y+Oe.h,l,Ye,ke.x,Be.y,Ve,Fe),$y(N,S.x,S.y,Ee.x,Qe+Ee.y,Oe.x+Oe.w,Oe.y+Oe.h,l,Ye,Be.x,Be.y,Ve,Fe),Vx(t.dynamicLayoutVertexArray,S,ee),I.emplaceBack(tt,tt+2,tt+1),I.emplaceBack(tt+1,tt+2,tt+3),B.vertexLength+=4,B.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Le[0]),te!==i.length-1&&st===i[te+1].sectionIndex||t.programConfigurations.populatePaintArrays(N.length,g,g.index,{imagePositions:{},canonical:D,formattedSection:X==null?void 0:X[st]})}t.placedSymbolArray.emplaceBack(S.x,S.y,q,this.glyphOffsetArray.length-q,W,w,P,S.segment,l?l[0]:0,l?l[1]:0,d[0],d[1],y,0,!1,0,T)}_addCollisionDebugVertex(t,i,l,d,p,g){return i.emplaceBack(0,0),t.emplaceBack(l.x,l.y,d,p,Math.round(g.x),Math.round(g.y))}addCollisionDebugVertices(t,i,l,d,p,g,y){const S=p.segments.prepareSegment(4,p.layoutVertexArray,p.indexArray),w=S.vertexLength,P=p.layoutVertexArray,T=p.collisionVertexArray,D=y.anchorX,I=y.anchorY;this._addCollisionDebugVertex(P,T,g,D,I,new A(t,i)),this._addCollisionDebugVertex(P,T,g,D,I,new A(l,i)),this._addCollisionDebugVertex(P,T,g,D,I,new A(l,d)),this._addCollisionDebugVertex(P,T,g,D,I,new A(t,d)),S.vertexLength+=4;const N=p.indexArray;N.emplaceBack(w,w+1),N.emplaceBack(w+1,w+2),N.emplaceBack(w+2,w+3),N.emplaceBack(w+3,w),S.primitiveLength+=4}addDebugCollisionBoxes(t,i,l,d){for(let p=t;p<i;p++){const g=this.collisionBoxArray.get(p);this.addCollisionDebugVertices(g.x1,g.y1,g.x2,g.y2,d?this.textCollisionBox:this.iconCollisionBox,g.anchorPoint,l)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new $x(Ne,tE.members,pt),this.iconCollisionBox=new $x(Ne,tE.members,pt);for(let t=0;t<this.symbolInstances.length;t++){const i=this.symbolInstances.get(t);this.addDebugCollisionBoxes(i.textBoxStartIndex,i.textBoxEndIndex,i,!0),this.addDebugCollisionBoxes(i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i,!0),this.addDebugCollisionBoxes(i.iconBoxStartIndex,i.iconBoxEndIndex,i,!1),this.addDebugCollisionBoxes(i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex,i,!1)}}_deserializeCollisionBoxesForSymbol(t,i,l,d,p,g,y,S,w){const P={};for(let T=i;T<l;T++){const D=t.get(T);P.textBox={x1:D.x1,y1:D.y1,x2:D.x2,y2:D.y2,anchorPointX:D.anchorPointX,anchorPointY:D.anchorPointY},P.textFeatureIndex=D.featureIndex;break}for(let T=d;T<p;T++){const D=t.get(T);P.verticalTextBox={x1:D.x1,y1:D.y1,x2:D.x2,y2:D.y2,anchorPointX:D.anchorPointX,anchorPointY:D.anchorPointY},P.verticalTextFeatureIndex=D.featureIndex;break}for(let T=g;T<y;T++){const D=t.get(T);P.iconBox={x1:D.x1,y1:D.y1,x2:D.x2,y2:D.y2,anchorPointX:D.anchorPointX,anchorPointY:D.anchorPointY},P.iconFeatureIndex=D.featureIndex;break}for(let T=S;T<w;T++){const D=t.get(T);P.verticalIconBox={x1:D.x1,y1:D.y1,x2:D.x2,y2:D.y2,anchorPointX:D.anchorPointX,anchorPointY:D.anchorPointY},P.verticalIconFeatureIndex=D.featureIndex;break}return P}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let i=0;i<this.symbolInstances.length;i++){const l=this.symbolInstances.get(i);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,l.textBoxStartIndex,l.textBoxEndIndex,l.verticalTextBoxStartIndex,l.verticalTextBoxEndIndex,l.iconBoxStartIndex,l.iconBoxEndIndex,l.verticalIconBoxStartIndex,l.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(t,i){const l=t.placedSymbolArray.get(i),d=l.vertexStartIndex+4*l.numGlyphs;for(let p=l.vertexStartIndex;p<d;p+=4)t.indexArray.emplaceBack(p,p+2,p+1),t.indexArray.emplaceBack(p+1,p+2,p+3)}
458getSortedSymbolIndexes(t){if(this.sortedAngle===t&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const i=Math.sin(t),l=Math.cos(t),d=[],p=[],g=[];for(let y=0;y<this.symbolInstances.length;++y){g.push(y);const S=this.symbolInstances.get(y);d.push(0|Math.round(i*S.anchorX+l*S.anchorY)),p.push(S.featureIndex)}return g.sort((y,S)=>d[y]-d[S]||p[S]-p[y]),g}addToSortKeyRanges(t,i){const l=this.sortKeyRanges[this.sortKeyRanges.length-1];(l==null?void 0:l.sortKey)===i?l.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:i,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const i of this.symbolInstanceIndexes){const l=this.symbolInstances.get(i);this.featureSortOrder.push(l.featureIndex);const d=[l.rightJustifiedTextSymbolIndex,l.centerJustifiedTextSymbolIndex,l.leftJustifiedTextSymbolIndex];for(let p=0;p<d.length;p++){const g=d[p];g>=0&&d.indexOf(g)===p&&this.addIndicesForPlacedSymbol(this.text,g)}l.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,l.verticalPlacedTextSymbolIndex),l.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.placedIconSymbolIndex),l.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,l.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let mE,gE;ct("SymbolBucket",Wd,{omit:["layers","collisionBoxArray","features","compareText"]}),Wd.MAX_GLYPHS=65535,Wd.addDynamicAttributes=Vx;var Gx={get paint(){return gE=gE||new Fn({"icon-opacity":new vt(Ue.paint_symbol["icon-opacity"]),"icon-color":new vt(Ue.paint_symbol["icon-color"]),"icon-halo-color":new vt(Ue.paint_symbol["icon-halo-color"]),"icon-halo-width":new vt(Ue.paint_symbol["icon-halo-width"]),"icon-halo-blur":new vt(Ue.paint_symbol["icon-halo-blur"]),"icon-translate":new ft(Ue.paint_symbol["icon-translate"]),"icon-translate-anchor":new ft(Ue.paint_symbol["icon-translate-anchor"]),"text-opacity":new vt(Ue.paint_symbol["text-opacity"]),"text-color":new vt(Ue.paint_symbol["text-color"],{runtimeType:oi,getOverride:o=>o.textColor,hasOverride:o=>!!o.textColor}),"text-halo-color":new vt(Ue.paint_symbol["text-halo-color"]),"text-halo-width":new vt(Ue.paint_symbol["text-halo-width"]),"text-halo-blur":new vt(Ue.paint_symbol["text-halo-blur"]),"text-translate":new ft(Ue.paint_symbol["text-translate"]),"text-translate-anchor":new ft(Ue.paint_symbol["text-translate-anchor"])})},get layout(){return mE=mE||new Fn({"symbol-placement":new ft(Ue.layout_symbol["symbol-placement"]),"symbol-spacing":new ft(Ue.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ft(Ue.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new vt(Ue.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ft(Ue.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ft(Ue.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ft(Ue.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ft(Ue.layout_symbol["icon-ignore-placement"]),"icon-optional":new ft(Ue.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ft(Ue.layout_symbol["icon-rotation-alignment"]),"icon-size":new vt(Ue.layout_symbol["icon-size"]),"icon-text-fit":new ft(Ue.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ft(Ue.layout_symbol["icon-text-fit-padding"]),"icon-image":new vt(Ue.layout_symbol["icon-image"]),"icon-rotate":new vt(Ue.layout_symbol["icon-rotate"]),"icon-padding":new vt(Ue.layout_symbol["icon-padding"]),"icon-keep-upright":new ft(Ue.layout_symbol["icon-keep-upright"]),"icon-offset":new vt(Ue.layout_symbol["icon-offset"]),"icon-anchor":new vt(Ue.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ft(Ue.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ft(Ue.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ft(Ue.layout_symbol["text-rotation-alignment"]),"text-field":new vt(Ue.layout_symbol["text-field"]),"text-font":new vt(Ue.layout_symbol["text-font"]),"text-size":new vt(Ue.layout_symbol["text-size"]),"text-max-width":new vt(Ue.layout_symbol["text-max-width"]),"text-line-height":new ft(Ue.layout_symbol["text-line-height"]),"text-letter-spacing":new vt(Ue.layout_symbol["text-letter-spacing"]),"text-justify":new vt(Ue.layout_symbol["text-justify"]),"text-radial-offset":new vt(Ue.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ft(Ue.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new vt(Ue.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new vt(Ue.layout_symbol["text-anchor"]),"text-max-angle":new ft(Ue.layout_symbol["text-max-angle"]),"text-writing-mode":new ft(Ue.layout_symbol["text-writing-mode"]),"text-rotate":new vt(Ue.layout_symbol["text-rotate"]),"text-padding":new ft(Ue.layout_symbol["text-padding"]),"text-keep-upright":new ft(Ue.layout_symbol["text-keep-upright"]),"text-transform":new vt(Ue.layout_symbol["text-transform"]),"text-offset":new vt(Ue.layout_symbol["text-offset"]),"text-allow-overlap":new ft(Ue.layout_symbol["text-allow-overlap"]),"text-overlap":new ft(Ue.layout_symbol["text-overlap"]),"text-ignore-placement":new ft(Ue.layout_symbol["text-ignore-placement"]),"text-optional":new ft(Ue.layout_symbol["text-optional"])})}};class yE{constructor(t){if(t.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:ss,this.defaultValue=t}evaluate(t){if(t.formattedSection){const i=this.defaultValue.property.overrides;if(i!=null&&i.hasOverride(t.formattedSection))return i.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}ct("FormatSectionOverride",yE,{omit:["defaultValue"]});
vendor: 4,988 bytes, line 458
458class Gy extends Ei{constructor(t,i){super(t,Gx,i)}recalculate(t,i){if(super.recalculate(t,i),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const l=this.layout.get("text-writing-mode");if(l){const d=[];for(const p of l)d.includes(p)||d.push(p);this.layout._values["text-writing-mode"]=d}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,i,l,d){const p=this.layout.get(t).evaluate(i,{},l,d),g=this._unevaluatedLayout._values[t];return g.isDataDriven()||fd(g.value)||!p?p:function(y,S){return S.replace(/{([^{}]+)}/g,(w,P)=>y&&P in y?String(y[P]):"")}(i.properties,p)}createBucket(t){return new Wd(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of Gx.paint.overridableProperties){if(!Gy.hasPaintOverride(this.layout,t))continue;const i=this.paint.get(t),l=new yE(i),d=new Rc(l,i.property.specification);let p=null;p=i.value.kind==="constant"||i.value.kind==="source"?new md("source",d):new gd("composite",d,i.value.zoomStops),this.paint._values[t]=new Zi(i.property,p,i.parameters)}}_handleOverridablePaintPropertyUpdate(t,i,l){return!(!this.layout||i.isDataDriven()||l.isDataDriven())&&Gy.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,i){const l=t.get("text-field"),d=Gx.paint.properties[i];let p=!1;const g=y=>{var S;for(const w of y)if(!((S=d.overrides)===null||S===void 0)&&S.hasOverride(w))return void(p=!0)};if(l.value.kind==="constant"&&l.value.value instanceof Xn)g(l.value.value.sections);else if(l.value.kind==="source"||l.value.kind==="composite"){const y=w=>{p||(w instanceof co&&Mr(w.value)===yc?g(w.value.sections):w instanceof Ks?g(w.sections):w.eachChild(y))},S=l.value;S._styleExpression&&y(S._styleExpression.expression)}return p}}let _E;var iF={get paint(){return _E=_E||new Fn({"background-color":new ft(Ue.paint_background["background-color"]),"background-pattern":new Ty(Ue.paint_background["background-pattern"]),"background-opacity":new ft(Ue.paint_background["background-opacity"])})}};class oF extends Ei{constructor(t,i){super(t,iF,i)}}class sF extends Ei{constructor(t,i){super(t,{},i),this.onAdd=l=>{this.implementation.onAdd&&this.implementation.onAdd(l,l.painter.context.gl)},this.onRemove=l=>{this.implementation.onRemove&&this.implementation.onRemove(l,l.painter.context.gl)},this.implementation=t}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class aF{constructor(t){this._methodToThrottle=t,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var t;this._triggered||(this._triggered=!0,(t=this._channel)===null||t===void 0||t.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const lF={once:!0},qx=63710088e-1;class gl{constructor(t,i){if(isNaN(t)||isNaN(i))throw new Error(`Invalid LngLat object: (${t}, ${i})`);if(this.lng=+t,this.lat=+i,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new gl(cr(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const i=Math.PI/180,l=this.lat*i,d=t.lat*i,p=Math.sin(l)*Math.sin(d)+Math.cos(l)*Math.cos(d)*Math.cos((t.lng-this.lng)*i);return qx*Math.acos(Math.min(p,1))}static convert(t){if(t instanceof gl)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new gl(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new gl(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const vE=2*Math.PI*qx;function xE(o){return vE*Math.cos(o*Math.PI/180)}function bE(o){return(180+o)/360}function wE(o){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360}function SE(o,t){return o/xE(t)}function TE(o){return 360*o-180}function qy(o){return 360/Math.PI*Math.atan(Math.exp((180-360*o)*Math.PI/180)
458)-90}function EE(o,t){return o*xE(qy(t))}class Vf{constructor(t,i,l=0){this.x=+t,this.y=+i,this.z=+l}static fromLngLat(t,i=0){const l=gl.convert(t);return new Vf(bE(l.lng),wE(l.lat),SE(i,l.lat))}toLngLat(){return new gl(TE(this.x),qy(this.y))}toAltitude(){return EE(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/vE*(t=qy(this.y),1/Math.cos(t*Math.PI/180));var t}}function PE(o,t,i){var l=2*Math.PI*6378137/256/Math.pow(2,i);return[o*l-2*Math.PI*6378137/2,t*l-2*Math.PI*6378137/2]}class Wx{constructor(t,i,l){if(!function(d,p,g){return!(d<0||d>25||g<0||g>=Math.pow(2,d)||p<0||p>=Math.pow(2,d))}(t,i,l))throw new Error(`x=${i}, y=${l}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=i,this.y=l,this.key=Zd(0,t,t,i,l)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,i,l){const d=(g=this.y,y=this.z,S=PE(256*(p=this.x),256*(g=Math.pow(2,y)-g-1),y),w=PE(256*(p+1),256*(g+1),y),S[0]+","+S[1]+","+w[0]+","+w[1]);var p,g,y,S,w;const P=function(T,D,I){let N="";for(let B=T;B>0;B--){const q=1<<B-1;N+=(D&q?1:0)+(I&q?2:0)}return N}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(l==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,i>1?"@2x":"").replace(/{quadkey}/g,P).replace(/{bbox-epsg-3857}/g,d)}isChildOf(t){const i=this.z-t.z;return i>0&&t.x===this.x>>i&&t.y===this.y>>i}getTilePoint(t){const i=Math.pow(2,this.z);return new A((t.x*i-this.x)*Pe,(t.y*i-this.y)*Pe)}toString(){return`${this.z}/${this.x}/${this.y}`}}class CE{constructor(t,i){this.wrap=t,this.canonical=i,this.key=Zd(t,i.z,i.z,i.x,i.y)}}class Ci{constructor(t,i,l,d,p){if(this.terrainRttPosMatrix32f=null,t<l)throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${l}`);this.overscaledZ=t,this.wrap=i,this.canonical=new Wx(l,+d,+p),this.key=Zd(i,t,l,d,p)}clone(){return new Ci(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const i=this.canonical.z-t;return t>this.canonical.z?new Ci(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ci(t,this.wrap,t,this.canonical.x>>i,this.canonical.y>>i)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(t,i){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const l=this.canonical.z-t;return t>this.canonical.z?Zd(this.wrap*+i,t,this.canonical.z,this.canonical.x,this.canonical.y):Zd(this.wrap*+i,t,t,this.canonical.x>>l,this.canonical.y>>l)}isChildOf(t){if(t.wrap!==this.wrap||this.overscaledZ-t.overscaledZ<=0)return!1;if(t.overscaledZ===0)return this.overscaledZ>0;const i=this.canonical.z-t.canonical.z;return!(i<0)&&t.canonical.x===this.canonical.x>>i&&t.canonical.y===this.canonical.y>>i}children(t){if(this.overscaledZ>=t)return[new Ci(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const i=this.canonical.z+1,l=2*this.canonical.x,d=2*this.canonical.y;return[new Ci(i,this.wrap,i,l,d),new Ci(i,this.wrap,i,l+1,d),new Ci(i,this.wrap,i,l,d+1),new Ci(i,this.wrap,i,l+1,d+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new Ci(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new Ci(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new CE(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new Vf(t.x-this.wrap,t.y))}normalizeCoordinates(t,i,l=8192){if(t>=0&&t<l&&i>=0&&i<l)return{tileID:this,x:t,y:i};const d=Math.floor(t/l),p=Math.floor(i/l),g=t-d*l,y=i-p*l,S=this.canonical.z,w=1<<S,P=this.canonical.y+p;if(P<0||P>=w)return null;let T=this.canonical.x+d,D=this.wrap;return T<0?(D-=Math.ceil(-T/w),T=(T%w+w)%w):T>=w&&(D+=Math.floor(T/w),T%=w),{tileID:new Ci(this.overscaledZ,D,S,T,P),x:g,y}}}function Zd(o,t,i,l,d){(o*=2)<0&&(o=-1*o-1);const p=1<<i;return(p*p*o+p*d+l).toString(36)+i.toString(36)+t.toString(36)}ct("CanonicalTileID",Wx),ct("OverscaledTileID",Ci,{omit:["terrainRttPosMatrix32f"]});class eu{constructor(){this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0}extend(t){return this.minX=Math.min(this.minX,t.x),this.minY=Math.min(this.minY,t.y),this.maxX=Math.max(this.maxX,t.x),this.maxY=Math.max(this.maxY,t.y),this}expandBy(t){return this.minX-=t,this.minY-=t,this.maxX+=t,this.maxY+=t,(this.minX>this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(t){return this.expandBy(-t)}map(t){const i=new eu;return i.extend(t(new A(this.minX,this.minY))),i.extend(t(new A(this.maxX,this.minY))),i.extend(t(new A(this.minX,this.maxY))),i.extend(t(new A(this.maxX,this.maxY))),i}static fromPoints(t){const i=new eu;for(const l of t)i.extend(l);return i}contains(t){return t.x>=this.minX&&t.x<=this.maxX&&t.y>=this.minY&&t.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(t){return!this.empty()&&!t.empty()&&t.minX>=this.minX&&t.maxX<=this.maxX&&t.minY>=this.minY&&t.maxY<=this.maxY}intersects(t){return!this.empty()&&!t.empty()&&t.minX<=this.maxX&&t.maxX>=this.minX&&t.minY<=this.maxY&&t.maxY>=this.minY}}class IE{constructor(t){this._stringToNumber={},this._numberToString=[];for(let i=0;i<t.length;i++){const l=t[i];this._stringToNumber[l]=i,this._numberToString[i]=l}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class ME{constructor(t,i,l,d,p){this.type="Feature",this._vectorTileFeature=t,this._x=l,this._y=d,this._z=i,this.properties=t.properties,this.id=p}projectPoint(t,i,l,d){return[360*(t.x+i)/d-180,360/Math.PI*Math.atan(Math.exp((1-2*(t.y+l)/d)*Math.PI))-90]}projectLine(t,i,l,d){return t.map(p=>this.projectPoint(p,i,l,d))}get geometry(){if(this._geometry)return this._geometry;const t=this._vectorTileFeature,i=t.extent*Math.pow(2,this._z),l=t.extent*this._x,d=t.extent*this._y,p=t.loadGeometry();switch(t.type){case 1:{const g=[];for(const S of p)g.push(S[0]);const y=this.projectLine(g,l,d,i);this._geometry=g.length===1?{type:"Point",coordinates:y[0]}:{type:"MultiPoint",coordinates:y};break}case 2:{const g=p.map(y=>this.projectLine(y,l,d,i));this._geometry=g.length===1?{type:"LineString",coordinates:g[0]}:{type:"MultiLineString",coordinates:g};break}case 3:{const g=kT(p),y=[];for(const S of g)y.push(S.map(w=>this.projectLine(w,l,d,i)));this._geometry=y.length===1?{type:"Polygon",coordinates:y[0]}:{type:"MultiPolygon",coordinates:y};break}default:throw new Error(`unknown feature type: ${t.type}`)}return this._geometry}set geometry(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const i in this)i!=="_geometry"&&i!=="_vectorTileFeature"&&i!=="_x"&&i!=="_y"&&i!=="_z"&&(t[i]=this[i]);return t}}class Hd{constructor(t,i,l){this._name=t,this.dataBuffer=i,typeof l=="number"?this._size=l:(this.nullabilityBuffer=l,this._size=l.size())}getValue(t){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(t)?null:this.getValueFromBuffer(t)}has(t){var i;return((i=this.nullabilityBuffer)==null?void 0:i.get(t))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Wy extends Hd{}class Zx extends Wy{getValueFromBuffer(t){return this.dataBuffer[t]}}class Hx extends Wy{getValueFromBuffer(t){return this.dataBuffer[t]}}class AE extends Hd{constructor(t,i,l,d){super(t,i,d),this.delta=l}}class Xx extends AE{constructor(t,i,l,d){super(t,Int32Array.of(i),l,d)}getValueFromBuffer(t){return this.dataBuffer[0]+t*this.delta}}class Kx extends Hd{constructor(t,i,l,d){super(t,d?Int32Array.of(i):Uint32Array.of(i),l)}getValueFromBuffer(t){return this.dataBuffer[0]}}class cF{constructor(t,i,l,d,p=4096){this._name=t,this._geometryVector=i,this._idVector=l,this._propertyVectors=d,this._extent=p}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(t){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(i=>[i.name,i]))),this.propertyVectorsMap.get(t)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){const t=[],i=this.geometryVector.getGeometries();for(let l=0;l<this.numFeatures;l++){let d;if(this.idVector){const y=this.idVector.getValue(l);d=this.containsMaxSafeIntegerValues(this.idVector)&&y!==null?Number(y):y}const p={coordinates:i[l],type:this.geometryVector.geometryType(l)},g={};
458for(const y of this.propertyVectors){if(!y)continue;const S=y.name,w=y.getValue(l);w!==null&&(g[S]=w)}t.push({id:d,geometry:p,properties:g})}return t}containsMaxSafeIntegerValues(t){return t instanceof Zx||t instanceof Kx||t instanceof Xx||t instanceof Hx}}class RE{constructor(t){this.value=t}get(){return this.value}set(t){this.value=t}increment(){return this.value++}add(t){this.value+=t}}var Ot,yl;(function(o){o.NONE="NONE",o.DELTA="DELTA",o.COMPONENTWISE_DELTA="COMPONENTWISE_DELTA",o.RLE="RLE",o.MORTON="MORTON",o.PDE="PDE"})(Ot||(Ot={})),function(o){o.NONE="NONE",o.FAST_PFOR="FAST_PFOR",o.VARINT="VARINT",o.ALP="ALP"}(yl||(yl={}));const Yx=new Uint32Array(33);Yx[0]=0;for(let o=1;o<=32;o++)Yx[o]=o===32?4294967295:4294967295>>>32-o;const Qx=Yx,da=256;function Jx(o,t){return o-o%t}function uF(o){const t=o>>>0;return((255&t)<<24|(65280&t)<<8|t>>>8&65280|t>>>24&255)>>>0}const eb=function(){if(!Number.isFinite(65536))return 65536;const o=Jx(Math.floor(65536),da);return o===0?da:o}(),dF=3*eb/da+eb|0;function kE(){const o=new Uint8Array(dF);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:o,byteContainerI32:new Int32Array(o.buffer,o.byteOffset,o.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function hF(o,t,i,l,d){switch(d){case 1:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0;y[w++]=D>>>0&1,y[w++]=D>>>1&1,y[w++]=D>>>2&1,y[w++]=D>>>3&1,y[w++]=D>>>4&1,y[w++]=D>>>5&1,y[w++]=D>>>6&1,y[w++]=D>>>7&1,y[w++]=D>>>8&1,y[w++]=D>>>9&1,y[w++]=D>>>10&1,y[w++]=D>>>11&1,y[w++]=D>>>12&1,y[w++]=D>>>13&1,y[w++]=D>>>14&1,y[w++]=D>>>15&1,y[w++]=D>>>16&1,y[w++]=D>>>17&1,y[w++]=D>>>18&1,y[w++]=D>>>19&1,y[w++]=D>>>20&1,y[w++]=D>>>21&1,y[w++]=D>>>22&1,y[w++]=D>>>23&1,y[w++]=D>>>24&1,y[w++]=D>>>25&1,y[w++]=D>>>26&1,y[w++]=D>>>27&1,y[w++]=D>>>28&1,y[w++]=D>>>29&1,y[w++]=D>>>30&1,y[w++]=D>>>31&1}})(o,t,i,l);break;case 2:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0,I=p[P++]>>>0;y[w++]=D>>>0&3,y[w++]=D>>>2&3,y[w++]=D>>>4&3,y[w++]=D>>>6&3,y[w++]=D>>>8&3,y[w++]=D>>>10&3,y[w++]=D>>>12&3,y[w++]=D>>>14&3,y[w++]=D>>>16&3,y[w++]=D>>>18&3,y[w++]=D>>>20&3,y[w++]=D>>>22&3,y[w++]=D>>>24&3,y[w++]=D>>>26&3,y[w++]=D>>>28&3,y[w++]=D>>>30&3,y[w++]=I>>>0&3,y[w++]=I>>>2&3,y[w++]=I>>>4&3,y[w++]=I>>>6&3,y[w++]=I>>>8&3,y[w++]=I>>>10&3,y[w++]=I>>>12&3,y[w++]=I>>>14&3,y[w++]=I>>>16&3,y[w++]=I>>>18&3,y[w++]=I>>>20&3,y[w++]=I>>>22&3,y[w++]=I>>>24&3,y[w++]=I>>>26&3,y[w++]=I>>>28&3,y[w++]=I>>>30&3}})(o,t,i,l);break;case 3:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0,I=p[P++]>>>0,N=p[P++]>>>0;y[w++]=D>>>0&7,y[w++]=D>>>3&7,y[w++]=D>>>6&7,y[w++]=D>>>9&7,y[w++]=D>>>12&7,y[w++]=D>>>15&7,y[w++]=D>>>18&7,y[w++]=D>>>21&7,y[w++]=D>>>24&7,y[w++]=D>>>27&7,y[w++]=7&(D>>>30|(1&I)<<2),y[w++]=I>>>1&7,y[w++]=I>>>4&7,y[w++]=I>>>7&7,y[w++]=I>>>10&7,y[w++]=I>>>13&7,y[w++]=I>>>16&7,y[w++]=I>>>19&7,y[w++]=I>>>22&7,y[w++]=I>>>25&7,y[w++]=I>>>28&7,y[w++]=7&(I>>>31|(3&N)<<1),y[w++]=N>>>2&7,y[w++]=N>>>5&7,y[w++]=N>>>8&7,y[w++]=N>>>11&7,y[w++]=N>>>14&7,y[w++]=N>>>17&7,y[w++]=N>>>20&7,y[w++]=N>>>23&7,y[w++]=N>>>26&7,y[w++]=N>>>29&7}})(o,t,i,l);break;case 4:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0,I=p[P++]>>>0,N=p[P++]>>>0,B=p[P++]>>>0;y[w++]=D>>>0&15,y[w++]=D>>>4&15,y[w++]=D>>>8&15,y[w++]=D>>>12&15,y[w++]=D>>>16&15,y[w++]=D>>>20&15,y[w++]=D>>>24&15,y[w++]=D>>>28&15,y[w++]=I>>>0&15,y[w++]=I>>>4&15,y[w++]=I>>>8&15,y[w++]=I>>>12&15,y[w++]=I>>>16&15,y[w++]=I>>>20&15,y[w++]=I>>>24&15,y[w++]=I>>>28&15,y[w++]=N>>>0&15,y[w++]=N>>>4&15,y[w++]=N>>>8&15,y[w++]=N>>>12&15,y[w++]=N>>>16&15,y[w++]=N>>>20&15,y[w++]=N>>>24&15,y[w++]=N>>>28&15,y[w++]=B>>>0&15,y[w++]=B>>>4&15,y[w++]=B>>>8&15,y[w++]=B>>>12&15,y[w++]=B>>>16&15,y[w++]=B>>>20&15,y[w++]=B>>>24&15,y[w++]=B>>>28&15}})(o,t,i,l);break;case 5:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0,I=p[P++]>>>0,N=p[P++]>>>0,B=p[P++]>>>0,q=p[P++]>>>0;y[w++]=D>>>0&31,y[w++]=D>>>5&31,y[w++]=D>>>10&31,y[w++]=D>>>15&31,y[w++]=D>>>20&31,y[w++]=D>>>25&31,y[w++]=31&(D>>>30|(7&I)<<2),y[w++]=I>>>3&31,y[w++]=I>>>8&31,y[w++]=I>>>13&31,y[w++]=I>>>18&31,y[w++]=I>>>23&31,y[w++]=31&(I>>>28|(1&N)<<4),y[w++]=N>>>1&31,y[w++]=N>>>6&31,y[w++]=N>>>11&31,y[w++]=N>>>16&31,y[w++]=N>>>21&31,y[w++]=N>>>26&31,y[w++]=31&(N>>>31|(15&B)<<1),y[w++]=B>>>4&31,y[w++]=B>>>9&31,y[w++]=B>>>14&31,y[w++]=B>>>19&31,y[w++]=B>>>24&31,y[w++]=31&(B>>>29|(3&q)<<3),y[w++]=q>>>2&31,y[w++]=q>>>
4587&31,y[w++]=q>>>12&31,y[w++]=q>>>17&31,y[w++]=q>>>22&31,y[w++]=q>>>27&31}})(o,t,i,l);break;case 6:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0,I=p[P++]>>>0,N=p[P++]>>>0,B=p[P++]>>>0,q=p[P++]>>>0,W=p[P++]>>>0;y[w++]=D>>>0&63,y[w++]=D>>>6&63,y[w++]=D>>>12&63,y[w++]=D>>>18&63,y[w++]=D>>>24&63,y[w++]=63&(D>>>30|(15&I)<<2),y[w++]=I>>>4&63,y[w++]=I>>>10&63,y[w++]=I>>>16&63,y[w++]=I>>>22&63,y[w++]=63&(I>>>28|(3&N)<<4),y[w++]=N>>>2&63,y[w++]=N>>>8&63,y[w++]=N>>>14&63,y[w++]=N>>>20&63,y[w++]=N>>>26&63,y[w++]=B>>>0&63,y[w++]=B>>>6&63,y[w++]=B>>>12&63,y[w++]=B>>>18&63,y[w++]=B>>>24&63,y[w++]=63&(B>>>30|(15&q)<<2),y[w++]=q>>>4&63,y[w++]=q>>>10&63,y[w++]=q>>>16&63,y[w++]=q>>>22&63,y[w++]=63&(q>>>28|(3&W)<<4),y[w++]=W>>>2&63,y[w++]=W>>>8&63,y[w++]=W>>>14&63,y[w++]=W>>>20&63,y[w++]=W>>>26&63}})(o,t,i,l);break;case 7:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0,I=p[P++]>>>0,N=p[P++]>>>0,B=p[P++]>>>0,q=p[P++]>>>0,W=p[P++]>>>0,ee=p[P++]>>>0;y[w++]=D>>>0&127,y[w++]=D>>>7&127,y[w++]=D>>>14&127,y[w++]=D>>>21&127,y[w++]=127&(D>>>28|(7&I)<<4),y[w++]=I>>>3&127,y[w++]=I>>>10&127,y[w++]=I>>>17&127,y[w++]=I>>>24&127,y[w++]=127&(I>>>31|(63&N)<<1),y[w++]=N>>>6&127,y[w++]=N>>>13&127,y[w++]=N>>>20&127,y[w++]=127&(N>>>27|(3&B)<<5),y[w++]=B>>>2&127,y[w++]=B>>>9&127,y[w++]=B>>>16&127,y[w++]=B>>>23&127,y[w++]=127&(B>>>30|(31&q)<<2),y[w++]=q>>>5&127,y[w++]=q>>>12&127,y[w++]=q>>>19&127,y[w++]=127&(q>>>26|(1&W)<<6),y[w++]=W>>>1&127,y[w++]=W>>>8&127,y[w++]=W>>>15&127,y[w++]=W>>>22&127,y[w++]=127&(W>>>29|(15&ee)<<3),y[w++]=ee>>>4&127,y[w++]=ee>>>11&127,y[w++]=ee>>>18&127,y[w++]=ee>>>25&127}})(o,t,i,l);break;case 8:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<8;T++){const D=p[P++]>>>0,I=p[P++]>>>0,N=p[P++]>>>0,B=p[P++]>>>0,q=p[P++]>>>0,W=p[P++]>>>0,ee=p[P++]>>>0,X=p[P++]>>>0;y[w++]=D>>>0&255,y[w++]=D>>>8&255,y[w++]=D>>>16&255,y[w++]=D>>>24&255,y[w++]=I>>>0&255,y[w++]=I>>>8&255,y[w++]=I>>>16&255,y[w++]=I>>>24&255,y[w++]=N>>>0&255,y[w++]=N>>>8&255,y[w++]=N>>>16&255,y[w++]=N>>>24&255,y[w++]=B>>>0&255,y[w++]=B>>>8&255,y[w++]=B>>>16&255,y[w++]=B>>>24&255,y[w++]=q>>>0&255,y[w++]=q>>>8&255,y[w++]=q>>>16&255,y[w++]=q>>>24&255,y[w++]=W>>>0&255,y[w++]=W>>>8&255,y[w++]=W>>>16&255,y[w++]=W>>>24&255,y[w++]=ee>>>0&255,y[w++]=ee>>>8&255,y[w++]=ee>>>16&255,y[w++]=ee>>>24&255,y[w++]=X>>>0&255,y[w++]=X>>>8&255,y[w++]=X>>>16&255,y[w++]=X>>>24&255}})(o,t,i,l);break;case 16:(function(p,g,y,S){let w=S,P=g;for(let T=0;T<128;T++){const D=p[P++]>>>0;y[w++]=65535&D,y[w++]=D>>>16&65535}})(o,t,i,l);break;default:(function(p,g,y,S,w){const P=Qx[w]>>>0;let T=g,D=0,I=p[T]>>>0,N=S;for(let B=0;B<8;B++){for(let q=0;q<32;q++)if(D+w<=32)y[N+q]=I>>>D&P,D+=w,D===32&&(D=0,T++,q!==31&&(I=p[T]>>>0));else{const W=32-D,ee=I>>>D;T++,I=p[T]>>>0;const X=w-W;y[N+q]=(ee|(I&-1>>>32-X>>>0)<<W)&P,D=X}N+=32,D=0,B<7&&(I=p[T]>>>0)}})(o,t,i,l,d)}return t+(d<<3)|0}function pF(o,t,i,l){if(i+2>t)throw new Error(`FastPFOR decode: byteContainer underflow at block=${l} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${i}, byteSize=${t})`);const d=o[i++],p=o[i++];if(d>32)throw new Error(`FastPFOR decode: invalid bitWidth=${d} at block=${l} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:d,exceptionCount:p,bytePosIn:i}}function fF(o,t,i,l,d,p,g,y,S){const{maxBits:w,exceptionBitWidth:P,bytePosIn:T}=function(q,W,ee,X,te,le){if(ee+1>W)throw new Error(`FastPFOR decode: exception header underflow at block=${le} (need 1 byte for maxBits, bytePos=${ee}, byteSize=${W})`);const he=q[ee++];if(he<X||he>32)throw new Error(`FastPFOR decode: invalid maxBits=${he} at block=${le} (bitWidth=${X}, expected ${X}..32)`);const Se=he-X|0;if(Se<1||Se>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${Se} at block=${le} (bitWidth=${X}, maxBits=${he})`);if(ee+te>W)throw new Error(`FastPFOR decode: exception positions underflow at block=${le} (need=${te}, have=${W-ee})`);return{maxBits:he,exceptionBitWidth:Se,bytePosIn:ee}}(d,p,g,i,l,S);if(g=T,P===1){const q=1<<i;for(let W=0;W<l;W=W+1|0)o[d[g++]+t|0]|=q;return g}const D=y.dataToBePacked[P];if(!D)throw new Error(`FastPFOR decode: missing exception stream for exceptionBitWidth=${P} (bitWidth=${i}, maxBits=${w}) at block ${S}`);const I=y.dataPointers;let N=0|I[P];const B=0|y.exceptionSizes[P];if(N+l>B)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${P} (ptr=${N}, need ${l}, size=${B}) at block ${S}`);for(let q=0;q<l;q=q+1|0){const W=d[g++],ee=0|D[N++];o[W+t|0]|=ee<<i}return I[P]=N,g}function mF(o,t,i,l,d,p){const g=0|i,y=0|o[g];if(y<=0||g+y>o.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${y} at pageStart=${g} (expected > 0 and pageStart+whereMeta < encoded.length=${o.length})`);const S=g+1|0,w=g+y|0,P=o[w]>>>0,T=P+3>>>2,D=w+1,I=D+T;if(I>=o.length)throw new Error(`FastPFOR decode: invalid byteSize=${P} (metaInts=${T}, pageStart=${g}, packedEnd=${w}, byteContainerStart=${D}) causes bitmapPos=${I} out of bounds (encoded.length=${o.length})`);const N=function(W,ee,X,te){te.byteContainer.length<X&&(te.byteContainer=new Uint8Array(2*X),te.byteContainerI32=void 0);const le=te.byteContainer,he=X>>>2;if(3&le.byteOffset)for(let Ee=0;Ee<he;Ee=Ee+1|0){const Oe=0|W[ee+Ee|0],ke=Ee<<2;le[ke]=255&Oe,le[ke+1|0]=Oe>>>8&255,le[ke+2|0]=Oe>>>16&255,le[ke+3|0]=Oe>>>24&255}else{let Ee=te.byteContainerI32;(!Ee||Ee.buffer!==le.buffer||Ee.byteOffset!==le.byteOffset||Ee.length<he)&&(Ee=te.byteContainerI32=new Int32Array(le.buffer,le.byteOffset,le.byteLength>>>2)),Ee.set(W.subarray(ee,ee+he))}const Se=3&X;if(Se>0){const Ee=0|W[ee+he|0],Oe=he<<2;for(let ke=0;ke<Se;ke=ke+1|0)le[Oe+ke|0]=Ee>>>(ke<<3)&255}return le}(o,D,P,p),B=P,q=function(W,ee,X){const te=0|W[ee++],le=X.dataToBePacked;for(let he=2;he<=32;he=he+1|0){if(!(te>>>he-1&1))continue;if(ee>=W.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${he}, streamWordIndex=${ee}, needWords=1, availableWords=${W.length-ee}, encodedWords=${W.length})`);const Se=W[ee++]>>>0,Ee=Jx(Se+31,32),Oe=Se*he+31>>>5;if(ee+Oe>W.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${he}, size=${Se}, streamWordIndex=${ee}, needWords=${Oe}, availableWords=${W.length-ee}, encodedWords=${W.length})`);let ke=le[he];(!ke||ke.length<Ee)&&(ke=le[he]=new Uint32Array(Ee));let Be=0;for(;Be<Se;Be=Be+32|0)gF(W,ee,ke,Be,he),ee=ee+he|0;ee=ee-((Be-Se|0)*he>>>5)|0,X.exceptionSizes[he]=Se}return ee}(o,I,p);return p.dataPointers.fill(0),function(W,ee,X,te,le,he,Se,Ee,Oe,ke){let Be=0|X,Ve=0;for(let Fe=0;Fe<Se;Fe=Fe+1|0){const Le=pF(Ee,Oe,Ve,Fe);Ve=Le.bytePosIn;const Ye=Le.bitWidth,st=Le.exceptionCount,tt=he+Fe*da|0;switch(Ye){case 0:le.fill(0,tt,tt+da);break;case 32:for(let Qe=0;Qe<da;Qe=Qe+1|0)le[tt+Qe|0]=0|W[Be+Qe|0];Be=Be+da|0;break;default:Be=hF(W,Be,le,tt,Ye)}st>0&&(Ve=fF(le,tt,Ye,st,Ee,Oe,Ve,ke,Fe))}if(Be!==te)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${ee}, packedStart=${X}, consumedPackedEnd=${Be}, expectedPackedEnd=${te}, packedWords=${te-X}, encoded.length=${W.length})`)}(o,g,S,w,t,0|l,d/da|0,N,B,p),q}function gF(o,t,i,l,d){switch(d){case 2:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0;T[I++]=N>>>0&3,T[I++]=N>>>2&3,T[I++]=N>>>4&3,T[I++]=N>>>6&3,T[I++]=N>>>8&3,T[I++]=N>>>10&3,T[I++]=N>>>12&3,T[I++]=N>>>14&3,T[I++]=N>>>16&3,T[I++]=N>>>18&3,T[I++]=N>>>20&3,T[I++]=N>>>22&3,T[I++]=N>>>24&3,T[I++]=N>>>26&3,T[I++]=N>>>28&3,T[I++]=N>>>30&3,T[I++]=B>>>0&3,T[I++]=B>>>2&3,T[I++]=B>>>4&3,T[I++]=B>>>6&3,T[I++]=B>>>8&3,T[I++]=B>>>10&3,T[I++]=B>>>12&3,T[I++]=B>>>14&3,T[I++]=B>>>16&3,T[I++]=B>>>18&3,T[I++]=B>>>20&3,T[I++]=B>>>22&3,T[I++]=B>>>24&3,T[I++]=B>>>26&3,T[I++]=B>>>28&3,T[I]=B>>>30&3}(o,t,i,l);case 3:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0;T[I++]=N>>>0&7,T[I++]=N>>>3&7,T[I++]=N>>>6&7,T[I++]=N>>>9&7,T[I++]=N>>>12&7,T[I++]=N>>>15&7,T[I++]=N>>>18&7,T[I++]=N>>>21&7,T[I++]=N>>>24&7,T[I++]=N>>>27&7,T[I++]=7&(N>>>30|(1&B)<<2),T[I++]=B>>>1&7,T[I++]=B>>>4&7,T[I++]=B>>>7&7,T[I++]=B>>>10&7,T[I++]=B>>>13&7,T[I++]=B>>>16&7,T[I++]=B>>>19&7,T[I++]=B>>>22&7,T[I++]=B>>>25&7,T[I++]=B>>>28&7,T[I++]=7&(B>>>31|(3&q)<<1),T[I++]=q>>>2&7,T[I++]=q>>>5&7,T[I++]=q>>>8&7,T[I++]=q>>>11&7,T[I++]=q>>>14&7,T[I++]=q>>>17&7,T[I++]=q>>>20&7,T[I++]=q>>>23&7,T[I++]=q>>>26&7,T[I]=q>>>29&7}(o,t,i,l);case 4:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0;T[I++]=N>>>0&15,T[I++]=N>>>4&15,T[I++]=N>>>8&15,T[I++]=N>>>12&15,T[I++]=N>>>16&15,T[I++]=N>>>20&15,T[I++]=N>>>24&15,T[I++]=N>>>28&15,T[I++]=B>>>0&15,T[I++]=B>>>4&15,T[I++]=B>>>8&15,T[I++]=B>>>12&15,T[I++]=B>>>16&15,T[I++]=B>>>20&15,T[I++]=B>>>24&15,T[I++]=B>>>28&15,T[I++]=q>>>0&15,T[I++]=q>>>4&15,T[I++]=q>>>8&15,T[I++]=q>>>12&15,T[I++]=q>>>16&15,T[I++]=q>>>20&15,T[I++]=q>>>24&15,T[I++]=q>>>28&15,T[I++]=W>>>0&15,T[I++]=W>>>4&15,T[I++]=W>>>8&15,T[I++]=W>>>12&15,T[I++]=W>>>16&15,T[I++]=W>>>20&15,T[I++]=W>>>24&15,T[I]=W>>>28&15}(o,t,i,l);case 5:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0;T[I++]=N>>>0&31,T[I++]=N>>>5&31,T[I++]=N>>>10&31,T[I++]=N>>>15&31,T[I++]=N>>>20&31,T[I++]=N>>>25&31,T[I++]=31&(N>>>30|(7&B)<<2),T[I++]=B>>>3&31,T[I++]=B>>>8&31,T[I++]=B>>>13&31,T[I++]=B>>>18&31,T[I++]=B>>>23&31,T[I++]=31&(B>>>28|(1&q)<<4),T[I++]=q>>>1&31,T[I++]=q>>>6&31,T[I++]=q>>>11&31,T[I++]=q>>>16&31,T[I++]=q>>>21&31,T[I++]=q>>>26&31,T[I++]=31&(q>>>31|(15&W)<<1),T[I++]=W>>>4&31,T[I++]=W>>>9&31,T[I++]=W>>>14&31,T[I++]=W>>>19&31,T[I++]=W>>>24&31,T[I++]=31&(W>>>29|(3&ee)<<3),T[I++]=ee>>>2&31,T[I++]=ee>>>7&31,T[I++]=ee>>>12&31,T[I++]=ee>>>17&31,T[I++]=ee>>>22&31,T[I]=ee>>>27&31}(o,t,i,l);case 6:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0;T[I++]=N>>>0&63,T[I++]=N>>>6&63,T[I++]=N>>>12&63,T[I++]=N>>>18&63,T[I++]=N>>>24&63,T[I++]=63&(N>>>30|(15&B)<<2),T[I++]=B>>>4&63,T[I++]=B>>>10&63,T[I++]=B>>>16&63,T[I++]=B>>>22&63,T[I++]=63&(B>>>28|(3&q)<<4),T[I++]=q>>>2&63,T[I++]=q>>>8&63,T[I++]=q>>>14&63,T[I++]=q>>>20&63,T[I++]=q>>>26&63,T[I++]=W>>>0&63,T[I++]=W>>>6&63,T[I++]=W>>>12&63,T[I++]=W>>>18&63,T[I++]=W>>>24&63,T[I++]=63&(W>>>30|(15&ee)<<2),T[I++]=ee>>>4&63,T[I++]=ee>>>10&63,T[I++]=ee>>>16&63,T[I++]=ee>>>22&63,T[I++]=63&(ee>>>28|(3&X)<<4),T[I++]=X>>>2&63,T[I++]=X>>>8&63,T[I++]=X>>>14&63,T[I++]=X>>>20&63,T[I]=X>>>26&63}(o,t,i,l);case 7:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0,te=w[P+6]>>>0;T[I++]=N>>>0&127,T[I++]=N>>>7&127,T[I++]=N>>>14&127,T[I++]=N>>>21&127,T[I++]=127&(N>>>28|(7&B)<<4),T[I++]=B>>>3&127,T[I++]=B>>>10&127,T[I++]=B>>>17&127,T[I++]=B>>>24&127,T[I++]=127&(B>>>31|(63&q)<<1),T[I++]=q>>>6&127,T[I++]=q>>>13&127,T[I++]=q>>>20&127,T[I++]=127&(q>>>27|(3&W)<<5),T[I++]=W>>>2&127,T[I++]=W>>>9&127,T[I++]=W>>>16&127,T[I++]=W>>>23&127,T[I++]=127&(W>>>30|(31&ee)<<2),T[I++]=ee>>>5&127,T[I++]=ee>>>12&127,T[I++]=ee>>>19&127,T[I++]=127&(ee>>>26|(1&X)<<6),T[I++]=X>>>1&127,T[I++]=X>>>8&127,T[I++]=X>>>15&127,T[I++]=X>>>22&127,T[I++]=127&(X>>>29|(15&te)<<3),T[I++]=te>>>4&127,T[I++]=te>>>11&127,T[I++]=te>>>18&127,T[I]=te>>>25&127}(o,t,i,l);case 8:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0,te=w[P+6]>>>0,le=w[P+7]>>>0;T[I++]=N>>>0&255,T[I++]=N>>>8&255,T[I++]=N>>>16&255,T[I++]=N>>>24&255,T[I++]=B>>>0&255,T[I++]=B>>>8&255,T[I++]=B>>>16&255,T[I++]=B>>>24&255,T[I++]=q>>>0&255,T[I++]=q>>>8&255,T[I++]=q>>>16&255,T[I++]=q>>>24&255,T[I++]=W>>>0&255,T[I++]=W>>>8&255,T[I++]=W>>>16&255,T[I++]=W>>>24&255,T[I++]=ee>>>0&255,T[I++]=ee>>>8&255,T[I++]=ee>>>16&255,T[I++]=ee>>>24&255,T[I++]=X>>>0&255,T[I++]=X>>>8&255,T[I++]=X>>>16&255,T[I++]=X>>>24&255,T[I++]=te>>>0&255,T[I++]=te>>>8&255,T[I++]=te>>>16&255,T[I++]=te>>>24&255,T[I++]=le>>>0&255,T[I++]=le>>>8&255,T[I++]=le>>>16&255,T[I]=le>>>24&255}(o,t,i,l);case 9:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0,te=w[P+6]>>>0,le=w[P+7]>>>0,he=w[P+8]>>>0;T[I++]=N>>>0&511,T[I++]=N>>>9&511,T[I++]=N>>>18&511,T[I++]=511&(N>>>27|(15&B)<<5),T[I++]=B>>>4&511,T[I++]=B>>>13&511,T[I++]=B>>>22&511,T[I++]=511&(B>>>31|(255&q)<<1),T[I++]=q>>>8&511,T[I++]=q>>>17&511,T[I++]=511&(q>>>26|(7&W)<<6),T[I++]=W>>>3&511,T[I++]=W>>>12&511,T[I++]=W>>>21&511,T[I++]=511&(W>>>30|(127&ee)<<2),T[I++]=ee>>>7&511,T[I++]=ee>>>16&511,T[I++]=511&(ee>>>25|(3&X)<<7),T[I++]=X>>>2&511,T[I++]=X>>>11&511,T[I++]=X>>>20&511,T[I++]=511&(X>>>29|(63&te)<<3),T[I++]=te>>>6&511,T[I++]=te>>>15&511,T[I++]=511&(te>>>24|(1&le)<<8),T[I++]=le>>>1&511,T[I++]=le>>>10&511,T[I++]=le>>>19&511,T[I++]=511&(le>>>28|(31&he)<<4),T[I++]=he>>>5&511,T[I++]=he>>>14&511,T[I]=he>>>23&511}
458(o,t,i,l);case 10:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0,te=w[P+6]>>>0,le=w[P+7]>>>0,he=w[P+8]>>>0,Se=w[P+9]>>>0;T[I++]=N>>>0&1023,T[I++]=N>>>10&1023,T[I++]=N>>>20&1023,T[I++]=1023&(N>>>30|(255&B)<<2),T[I++]=B>>>8&1023,T[I++]=B>>>18&1023,T[I++]=1023&(B>>>28|(63&q)<<4),T[I++]=q>>>6&1023,T[I++]=q>>>16&1023,T[I++]=1023&(q>>>26|(15&W)<<6),T[I++]=W>>>4&1023,T[I++]=W>>>14&1023,T[I++]=1023&(W>>>24|(3&ee)<<8),T[I++]=ee>>>2&1023,T[I++]=ee>>>12&1023,T[I++]=ee>>>22&1023,T[I++]=X>>>0&1023,T[I++]=X>>>10&1023,T[I++]=X>>>20&1023,T[I++]=1023&(X>>>30|(255&te)<<2),T[I++]=te>>>8&1023,T[I++]=te>>>18&1023,T[I++]=1023&(te>>>28|(63&le)<<4),T[I++]=le>>>6&1023,T[I++]=le>>>16&1023,T[I++]=1023&(le>>>26|(15&he)<<6),T[I++]=he>>>4&1023,T[I++]=he>>>14&1023,T[I++]=1023&(he>>>24|(3&Se)<<8),T[I++]=Se>>>2&1023,T[I++]=Se>>>12&1023,T[I]=Se>>>22&1023}(o,t,i,l);case 11:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0,te=w[P+6]>>>0,le=w[P+7]>>>0,he=w[P+8]>>>0,Se=w[P+9]>>>0,Ee=w[P+10]>>>0;T[I++]=N>>>0&2047,T[I++]=N>>>11&2047,T[I++]=2047&(N>>>22|(1&B)<<10),T[I++]=B>>>1&2047,T[I++]=B>>>12&2047,T[I++]=2047&(B>>>23|(3&q)<<9),T[I++]=q>>>2&2047,T[I++]=q>>>13&2047,T[I++]=2047&(q>>>24|(7&W)<<8),T[I++]=W>>>3&2047,T[I++]=W>>>14&2047,T[I++]=2047&(W>>>25|(15&ee)<<7),T[I++]=ee>>>4&2047,T[I++]=ee>>>15&2047,T[I++]=2047&(ee>>>26|(31&X)<<6),T[I++]=X>>>5&2047,T[I++]=X>>>16&2047,T[I++]=2047&(X>>>27|(63&te)<<5),T[I++]=te>>>6&2047,T[I++]=te>>>17&2047,T[I++]=2047&(te>>>28|(127&le)<<4),T[I++]=le>>>7&2047,T[I++]=le>>>18&2047,T[I++]=2047&(le>>>29|(255&he)<<3),T[I++]=he>>>8&2047,T[I++]=he>>>19&2047,T[I++]=2047&(he>>>30|(511&Se)<<2),T[I++]=Se>>>9&2047,T[I++]=Se>>>20&2047,T[I++]=2047&(Se>>>31|(1023&Ee)<<1),T[I++]=Ee>>>10&2047,T[I]=Ee>>>21&2047}(o,t,i,l);case 12:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0,te=w[P+6]>>>0,le=w[P+7]>>>0,he=w[P+8]>>>0,Se=w[P+9]>>>0,Ee=w[P+10]>>>0,Oe=w[P+11]>>>0;T[I++]=N>>>0&4095,T[I++]=N>>>12&4095,T[I++]=4095&(N>>>24|(15&B)<<8),T[I++]=B>>>4&4095,T[I++]=B>>>16&4095,T[I++]=4095&(B>>>28|(255&q)<<4),T[I++]=q>>>8&4095,T[I++]=q>>>20&4095,T[I++]=W>>>0&4095,T[I++]=W>>>12&4095,T[I++]=4095&(W>>>24|(15&ee)<<8),T[I++]=ee>>>4&4095,T[I++]=ee>>>16&4095,T[I++]=4095&(ee>>>28|(255&X)<<4),T[I++]=X>>>8&4095,T[I++]=X>>>20&4095,T[I++]=te>>>0&4095,T[I++]=te>>>12&4095,T[I++]=4095&(te>>>24|(15&le)<<8),T[I++]=le>>>4&4095,T[I++]=le>>>16&4095,T[I++]=4095&(le>>>28|(255&he)<<4),T[I++]=he>>>8&4095,T[I++]=he>>>20&4095,T[I++]=Se>>>0&4095,T[I++]=Se>>>12&4095,T[I++]=4095&(Se>>>24|(15&Ee)<<8),T[I++]=Ee>>>4&4095,T[I++]=Ee>>>16&4095,T[I++]=4095&(Ee>>>28|(255&Oe)<<4),T[I++]=Oe>>>8&4095,T[I]=Oe>>>20&4095}(o,t,i,l);case 16:return void function(w,P,T,D){let I=D;const N=w[P]>>>0,B=w[P+1]>>>0,q=w[P+2]>>>0,W=w[P+3]>>>0,ee=w[P+4]>>>0,X=w[P+5]>>>0,te=w[P+6]>>>0,le=w[P+7]>>>0,he=w[P+8]>>>0,Se=w[P+9]>>>0,Ee=w[P+10]>>>0,Oe=w[P+11]>>>0,ke=w[P+12]>>>0,Be=w[P+13]>>>0,Ve=w[P+14]>>>0,Fe=w[P+15]>>>0;T[I++]=N>>>0&65535,T[I++]=N>>>16&65535,T[I++]=B>>>0&65535,T[I++]=B>>>16&65535,T[I++]=q>>>0&65535,T[I++]=q>>>16&65535,T[I++]=W>>>0&65535,T[I++]=W>>>16&65535,T[I++]=ee>>>0&65535,T[I++]=ee>>>16&65535,T[I++]=X>>>0&65535,T[I++]=X>>>16&65535,T[I++]=te>>>0&65535,T[I++]=te>>>16&65535,T[I++]=le>>>0&65535,T[I++]=le>>>16&65535,T[I++]=he>>>0&65535,T[I++]=he>>>16&65535,T[I++]=Se>>>0&65535,T[I++]=Se>>>16&65535,T[I++]=Ee>>>0&65535,T[I++]=Ee>>>16&65535,T[I++]=Oe>>>0&65535,T[I++]=Oe>>>16&65535,T[I++]=ke>>>0&65535,T[I++]=ke>>>16&65535,T[I++]=Be>>>0&65535,T[I++]=Be>>>16&65535,T[I++]=Ve>>>0&65535,T[I++]=Ve>>>16&65535,T[I++]=Fe>>>0&65535,T[I]=Fe>>>16&65535}(o,t,i,l);case 32:for(let w=0;w<32;w=w+1|0)i[l+w|0]=0|o[t+w|0];return}const p=Qx[d]>>>0;let g=t,y=0,S=o[g]>>>0;for(let w=0;w<32;w++)if(y+d<=32)i[l+w]=S>>>y&p,y+=d,y===32&&(y=0,g++,w!==31&&(S=o[g]>>>0));else{const P=32-y,T=S>>>y;g++,S=o[g]>>>0,i[l+w]=(T|(S&Qx[d-P]>>>0)<<P)&p,y=d-P}}function Bn(o,t,i){const l=new Uint32Array(i);let d=0,p=t.get();for(let g=0;g<l.length;g++){let y=o[p++],S=127&y;y<128||(y=o[p++],S|=(127&y)<<7,y<128||(y=o[p++],S|=(127&y)<<14,y<128||(y=o[p++],S|=(127&y)<<21,y<128||(y=o[p++],S|=(15&y)<<28)))),l[d++]=S}return t.set(p),l}function Xd(o,t,i){const l=new BigUint64Array(i);for(let d=0;d<l.length;d++)l[d]=yF(o,t);return l}function yF(o,t){let i=0n,l=0,d=t.get();for(;d<o.length;){const p=o[d++];if(i|=BigInt(127&p)<<BigInt(l),!(128&p))break;if(l+=7,l>=64)throw new Error("Varint too long")}return t.set(d),i}function _F(o,t){let i,l;return l=o[t.get()],t.increment(),i=127&l,l<128?i:(l=o[t.get()],t.increment(),i|=(127&l)<<7,l<128?i:(l=o[t.get()],t.increment(),i|=(127&l)<<14,l<128?i:(l=o[t.get()],t.increment(),i|=(127&l)<<21,l<128?i:(l=o[t.get()],i|=(15&l)<<28,function(d,p,g){let y,S;if(S=p[g.get()],g.increment(),y=(112&S)>>4,S<128||(S=p[g.get()],g.increment(),y|=(127&S)<<3,S<128)||(S=p[g.get()],g.increment(),y|=(127&S)<<10,S<128)||(S=p[g.get()],g.increment(),y|=(127&S)<<17,S<128)||(S=p[g.get()],g.increment(),y|=(127&S)<<24,S<128)||(S=p[g.get()],g.increment(),y|=(1&S)<<31,S<128))return 4294967296*y+(d>>>0);throw new Error("Expected varint not more than 10 bytes")}(i,o,t)))))}function rr(o){return o>>>1^-(1&o)}function Qn(o){return o>>1n^-(1n&o)}function Kd(o){return o%2==1?(o+1)/-2:o/2}function tb(o,t,i){if(i===void 0){i=0;for(let p=0;p<t;p++)i+=o[p]}const l=new Uint32Array(i);let d=0;for(let p=0;p<t;p++){const g=o[p];l.fill(o[p+t],d,d+g),d+=g}return l}function rb(o,t,i){if(i===void 0){i=0;for(let p=0;p<t;p++)i+=Number(o[p])}const l=new BigUint64Array(i);let d=0;for(let p=0;p<t;p++){const g=Number(o[p]);l.fill(o[p+t],d,d+g),d+=g}return l}function DE(o,t,i){const l=new Float64Array(i);let d=0;for(let p=0;p<t;p++){const g=o[p];l.fill(o[p+t],d,d+g),d+=g}return l}function LE(o){const t=new Int32Array(o.length);t[0]=rr(o[0]);const i=o.length/4*4;let l=1;if(i>=4)for(;l<i-4;l+=4){const d=o[l+1],p=o[l+2],g=o[l+3];t[l]=rr(o[l])+t[l-1],t[l+1]=rr(d)+t[l],t[l+2]=rr(p)+t[l+1],t[l+3]=rr(g)+t[l+2]}for(;l!==o.length;++l)t[l]=rr(o[l])+t[l-1];return t}function zE(o){const t=new BigInt64Array(o.length);t[0]=Qn(o[0]);const i=o.length/4*4;let l=1;if(i>=4)for(;l<i-4;l+=4){const d=o[l+1],p=o[l+2],g=o[l+3];t[l]=Qn(o[l])+t[l-1],t[l+1]=Qn(d)+t[l],t[l+2]=Qn(p)+t[l+1],t[l+3]=Qn(g)+t[l+2]}for(;l!==t.length;++l)t[l]=Qn(o[l])+t[l-1];return t}function nb(o){const t=o.length/4*4;let i=1;if(t>=4)for(let l=o[0];i<t-4;i+=4)l=o[i]+=l,l=o[i+1]+=l,l=o[i+2]+=l,l=o[i+3]+=l;for(;i!==o.length;)o[i]+=o[i-1],++i}var Pn,No,tu,Ii,hr,en,OE,_l;function Jn(o,t){const i=function(l,d){const p=l[d.get()],g=Object.values(Pn)[p>>4];let y=null;switch(g){case Pn.DATA:y={dictionaryType:Object.values(No)[15&p]};break;case Pn.OFFSET:y={offsetType:Object.values(tu)[15&p]};break;case Pn.LENGTH:y={lengthType:Object.values(Ii)[15&p]}}d.increment();const S=l[d.get()],w=Object.values(Ot)[S>>5],P=Object.values(Ot)[S>>2&7],T=Object.values(yl)[3&S];d.increment();const D=Bn(l,d,2),I=D[0];return{physicalStreamType:g,logicalStreamType:y,logicalLevelTechnique1:w,logicalLevelTechnique2:P,physicalLevelTechnique:T,numValues:I,byteLength:D[1],decompressedCount:I}}(o,t);return i.logicalLevelTechnique1===Ot.MORTON?function(l,d,p){const g=Bn(d,p,2);return{physicalStreamType:l.physicalStreamType,logicalStreamType:l.logicalStreamType,logicalLevelTechnique1:l.logicalLevelTechnique1,logicalLevelTechnique2:l.logicalLevelTechnique2,physicalLevelTechnique:l.physicalLevelTechnique,numValues:l.numValues,byteLength:l.byteLength,decompressedCount:l.decompressedCount,numBits:g[0],coordinateShift:g[1]}}(i,o,t):Ot.RLE!==i.logicalLevelTechnique1&&Ot.RLE!==i.logicalLevelTechnique2||yl.NONE===i.physicalLevelTechnique?i:function(l,d,p){const g=Bn(d,p,2);return{physicalStreamType:l.physicalStreamType,logicalStreamType:l.logicalStreamType,logicalLevelTechnique1:l.logicalLevelTechnique1,logicalLevelTechnique2:l.logicalLevelTechnique2,physicalLevelTechnique:l.physicalLevelTechnique,numValues:l.numValues,byteLength:l.byteLength,decompressedCount:g[1],runs:g[0],numRleValues:g[1]}}(i,o,t)}(function(o){o.PRESENT="PRESENT",o.DATA="DATA",o.OFFSET="OFFSET",o.LENGTH="LENGTH"})(Pn||(Pn={})),function(o){o.NONE="NONE",o.SINGLE="SINGLE",o.SHARED="SHARED",o.VERTEX="VERTEX",o.MORTON="MORTON",o.FSST="FSST"}(No||(No={})),function(o){o.VERTEX="VERTEX",o.INDEX="INDEX",o.STRING="STRING",o.KEY="KEY"}(tu||(tu={})),function(o){o.VAR_BINARY="VAR_BINARY",o.GEOMETRIES="GEOMETRIES",o.PARTS="PARTS",o.RINGS="RINGS",o.TRIANGLES="TRIANGLES",o.SYMBOL="SYMBOL",o.DICTIONARY="DICTIONARY"}(Ii||(Ii={})),function(o){o[o.FLAT=0]="FLAT",o[o.CONST=1]="CONST",o[o.SEQUENCE=2]="SEQUENCE",o[o.DICTIONARY=3]="DICTIONARY",o[o.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(hr||(hr={}));class Bo{constructor(t,i){this.values=t,this._size=i}get(t){const i=Math.floor(t/8);return(this.values[i]>>t%8&1)==1}set(t,i){const l=Math.floor(t/8);this.values[l]=this.values[l]|(i?1:0)<<t%8}getInt(t){const i=Math.floor(t/8);return this.values[i]>>t%8&1}size(){return this._size}getBuffer(){return this.values}}function Yd(o,t,i){if(!t)return o;const l=t.size(),d=new o.constructor(l);let p=0;for(let g=0;g<l;g++)d[g]=t.get(g)?o[p++]:i;return d}function ib(o,t,i,l,d){return function(p,g,y,S){let w;switch(g.logicalLevelTechnique1){case Ot.DELTA:if(g.logicalLevelTechnique2===Ot.RLE){const P=g;if(!S)return function(T,D,I){const N=new Int32Array(I);let B=0,q=0;for(let W=0;W<D;W++){const ee=T[W],X=rr(T[W+D]);for(let te=0;te<ee;te++)q+=X,N[B++]=q}return N}(p,P.runs,P.numRleValues);w=LE(p=tb(p,P.runs,P.numRleValues))}else w=LE(p);break;case Ot.RLE:w=function(P,T,D){if(D===void 0){D=0;for(let B=0;B<T;B++)D+=P[B]}const I=new Int32Array(D);let N=0;for(let B=0;B<T;B++){const q=P[B];let W=P[B+T];W=rr(W),I.fill(W,N,N+q),N+=q}return I}(p,g.runs,g.numRleValues);break;case Ot.MORTON:nb(p),w=new Int32Array(p);break;case Ot.COMPONENTWISE_DELTA:w=function(P){if(P.length<2)return new Int32Array(P);const T=new Int32Array(P.length);T[0]=rr(P[0]),T[1]=rr(P[1]);const D=P.length/4*4;let I=2;if(D>=4)for(;I<D-4;I+=4){const N=P[I+1],B=P[I+2],q=P[I+3];T[I]=rr(P[I])+T[I-2],T[I+1]=rr(N)+T[I-1],T[I+2]=rr(B)+T[I],T[I+3]=rr(q)+T[I+1]}for(;I!==P.length;I+=2)T[I]=rr(P[I])+T[I-2],T[I+1]=rr(P[I+1])+T[I-1];return T}(p);break;case Ot.NONE:w=function(P){const T=new Int32Array(P.length);for(let D=0;D<P.length;D++)T[D]=rr(P[D]);return T}(p);break;default:throw new Error(`The specified Logical level technique is not supported: ${g.logicalLevelTechnique1}`)}return S?Yd(w,S,0):w}(Qd(o,t,i),i,0,d)}function Mi(o,t,i,l,d){return function(p,g,y,S){let w;switch(g.logicalLevelTechnique1){case Ot.DELTA:w=function(P){const T=new Uint32Array(P.length);T[0]=rr(P[0])>>>0;for(let D=1;D<P.length;D++)T[D]=T[D-1]+rr(P[D])>>>0;return T}(g.logicalLevelTechnique2===Ot.RLE?tb(p,g.runs,g.numRleValues):p);break;case Ot.RLE:w=tb(p,g.runs,g.numRleValues);break;case Ot.MORTON:nb(p),w=p;break;case Ot.COMPONENTWISE_DELTA:w=function(P){if(P.length<2)return new Uint32Array(P);const T=new Uint32Array(P.length);T[0]=rr(P[0])>>>0,T[1]=rr(P[1])>>>0;for(let D=2;D<P.length;D+=2)T[D]=T[D-2]+rr(P[D])>>>0,T[D+1]=T[D-1]+rr(P[D+1])>>>0;return T}(p);break;case Ot.NONE:w=p;break;default:throw new Error(`The specified Logical level technique is not supported: ${g.logicalLevelTechnique1}`)}return S?Yd(w,S,0):w}(Qd(o,t,i),i,0,d)}function vl(o,t,i){return function(l,d){if(d.logicalLevelTechnique1===Ot.DELTA&&d.logicalLevelTechnique2===Ot.NONE)return function(p){const g=new Int32Array(p.length+1);g[0]=0,g[1]=rr(p[0]);let y=g[1];for(let S=2;S!==g.length;++S)y+=rr(p[S-1]),g[S]=g[S-1]+y;return new Uint32Array(g)}(l);if(d.logicalLevelTechnique1===Ot.RLE&&d.logicalLevelTechnique2===Ot.NONE)return function(p,g,y){const S=new Uint32Array(y+1);S[0]=0;let w=1,P=S[0];for(let T=0;T<g;
458T++){const D=p[T],I=p[T+g];for(let N=w;N<w+D;N++)S[N]=I+P,P=S[N];w+=D}return S}(l,d.runs,d.numRleValues);if(d.logicalLevelTechnique1===Ot.NONE&&d.logicalLevelTechnique2===Ot.NONE){(function(g){let y=0;for(let S=0;S<g.length;S++)g[S]+=y,y=g[S]})(l);const p=new Uint32Array(d.numValues+1);return p[0]=0,p.set(l,1),p}if(d.logicalLevelTechnique1===Ot.DELTA&&d.logicalLevelTechnique2===Ot.RLE){const p=function(g,y,S){const w=new Int32Array(S+1);w[0]=0;let P=1,T=w[0];for(let D=0;D<y;D++){const I=g[D];let N=g[D+y];N=rr(N);for(let B=P;B<P+I;B++)w[B]=N+T,T=w[B];P+=I}return w}(l,d.runs,d.numRleValues);return nb(p),new Uint32Array(p)}throw new Error("Only delta encoding is supported for transforming length to offset streams yet.")}(Qd(o,t,i),i)}function Qd(o,t,i){const l=i.physicalLevelTechnique;switch(l){case yl.FAST_PFOR:return function(d,p,g,y){return function(S,w,P,T,D){const I=T.get();if(3&P)throw new Error(`FastPFOR: invalid encodedByteLength=${P} at offset=${I} (encodedBytes.length=${S.length}; expected a multiple of 4 bytes for an int32 big-endian word stream)`);const N=P>>>2,B=function(W,ee){if(ee<=W.encodedWords.length)return W.encodedWords;const X=new Uint32Array(Math.max(16,2*ee));return W.encodedWords=X,X}(D,N);(function(W,ee,X,te){if(ee<0||X<0||ee+X>W.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${ee}, byteLength=${X}, bytes.length=${W.length})`);const le=Math.floor(X/4),he=X%4!=0,Se=he?le+1:le;if(te.length<Se)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${te.length} < ${Se}`);if(le>0){const Ee=W.byteOffset+ee;if(3&Ee)for(let Oe=0;Oe<le;Oe++){const ke=ee+4*Oe;te[Oe]=W[ke]<<24|W[ke+1]<<16|W[ke+2]<<8|W[ke+3]}else{const Oe=new Uint32Array(W.buffer,Ee,le);for(let ke=0;ke<le;ke++)te[ke]=0|uF(Oe[ke])}}if(he){const Ee=ee+4*le,Oe=X-4*le;let ke=0;for(let Be=0;Be<Oe;Be++)ke|=W[Ee+Be]<<24-8*Be;te[le]=0|ke}})(S,I,P,B);const q=function(W,ee,X){let te=0,le=0;const he=new Uint32Array(ee),Se=X??kE();if(W.length>0){const Ee=0|W[te];if(te=te+1|0,255&Ee)throw new Error(`FastPFOR decode: invalid alignedLength=${Ee} (expected multiple of 256)`);if(le+Ee>he.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${le}, alignedLength=${Ee}, out.length=${he.length})`);te=function(Oe,ke,Be,Ve,Fe,Le){const Ye=Ve+Jx(Fe,da);let st=Ve,tt=Be;for(;st!==Ye;){const Qe=Math.min(eb,Ye-st);tt=mF(Oe,ke,tt,st,Qe,Le),st=st+Qe|0}return tt}(W,he,te,le,Ee,Se),le=le+Ee|0}return function(Ee,Oe,ke,Be,Ve,Fe){if(Fe===0)return Oe;let Le=0,Ye=Oe;const st=Oe+ke,tt=Ve;let Qe=Ve;const wt=Ve+Fe;let Vt=0,qt=0;for(;Ye<st&&Qe<wt;){const er=Ee[Ye]>>>Le&255;if(Le+=8,Ye+=Le>>>5,Le&=31,Vt|=(127&er)<<qt,128&er)Be[Qe++]=0|Vt,Vt=0,qt=0;else if(qt+=7,qt>28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${qt}, partial=${Vt}, decoded=${Qe-tt}/${Fe}, inPos=${Ye}, inEnd=${st})`)}if(Qe!==wt)throw new Error(`FastPFOR VByte: truncated stream (decoded=${Qe-tt}, expected=${Fe}, consumedWords=${Ye-Oe}/${ke}, vbyteStart=${Oe}, vbyteEnd=${st})`)}(W,te,W.length-te|0,he,le,ee-le|0),he}(B.subarray(0,N),w,D.decoderWorkspace);return T.add(P),q}(d,p,g,y,function(S=16){if(S<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${S}`);const w=Math.max(16,0|S);return{encodedWords:new Uint32Array(w),decoderWorkspace:kE()}}(g>>>2))}(o,i.numValues,i.byteLength,t);case yl.VARINT:return Bn(o,t,i.numValues);case yl.NONE:{const d=t.get();t.add(i.byteLength);const p=o.subarray(d,t.get());return new Uint32Array(p)}default:throw new Error(`Specified physicalLevelTechnique ${l} is not supported (yet).`)}}function ob(o,t,i){const l=Qd(o,t,i);return l.length===1?l[0]:function(d){return d[1]}(l)}function FE(o,t,i){return function(l){if(l.length===2){const d=rr(l[1]);return[d,d]}return[rr(l[2]),rr(l[3])]}(Qd(o,t,i))}function jE(o,t,i){return function(l){if(l.length===2){const d=Qn(l[1]);return[d,d]}return[Qn(l[2]),Qn(l[3])]}(Xd(o,t,i.numValues))}function NE(o,t,i,l){return function(d,p,g){let y;switch(p.logicalLevelTechnique1){case Ot.DELTA:y=function(S){const w=new BigUint64Array(S.length);w[0]=BigInt.asUintN(64,Qn(S[0]));for(let P=1;P<S.length;P++)w[P]=BigInt.asUintN(64,w[P-1]+Qn(S[P]));return w}(p.logicalLevelTechnique2===Ot.RLE?rb(d,p.runs,p.numRleValues):d);break;case Ot.RLE:y=rb(d,p.runs,p.numRleValues);break;case Ot.NONE:y=d;break;default:throw new Error(`The specified Logical level technique is not supported: ${p.logicalLevelTechnique1}`)}return g?Yd(y,g,0n):y}(Xd(o,t,i.numValues),i,l)}function BE(o,t,i){const l=Xd(o,t,i.numValues);return l.length===1?l[0]:function(d){return d[1]}(l)}function Zy(o,t,i,l,d="int32"){const p=o.logicalLevelTechnique1;if(p===Ot.RLE)return o.runs===1?hr.CONST:hr.FLAT;if(p!==Ot.DELTA||o.logicalLevelTechnique2!==Ot.RLE)return o.numValues===1?hr.CONST:hr.FLAT;const g=t instanceof Bo?t.size():t;if(o.numRleValues!==g)return hr.FLAT;if(o.runs===1)return hr.SEQUENCE;
458if(o.runs!==2)return o.numValues===1?hr.CONST:hr.FLAT;const y=l.get();if(o.physicalLevelTechnique===yl.VARINT)return function(P,T,D){const I=new RE(T.get());if(D==="int64"){const B=Xd(P,I,4);return B[2]===2n&&B[3]===2n}const N=Bn(P,I,4);return N[2]===2&&N[3]===2}(i,l,d)?hr.SEQUENCE:o.numValues===1?hr.CONST:hr.FLAT;const S=l.get(),w=new Int32Array(i.buffer,i.byteOffset+S,4);return l.set(y),w[2]===2&&w[3]===2?hr.SEQUENCE:o.numValues===1?hr.CONST:hr.FLAT}class VE extends Wy{getValueFromBuffer(t){return this.dataBuffer[t]}}class UE extends AE{constructor(t,i,l,d){super(t,BigInt64Array.of(i),l,d)}getValueFromBuffer(t){return this.dataBuffer[0]+BigInt(t)*this.delta}}function sb(o,t,i){return{x:$E(o,t)-i,y:$E(o>>1,t)-i}}function $E(o,t){let i=0;for(let l=0;l<t;l++)i|=(o&1<<2*l)>>l;return i}function Jd(o,t,i,l,d,p,g){return o===_l.MORTON?function(y,S,w,P,T,D){const I=new Array(T?P+1:P);for(let N=0;N<P;N++){const B=sb(y[S[w+N]],D.numBits,D.coordinateShift);I[N]=new A(B.x,B.y)}return T&&(I[I.length-1]=I[0]),I}(t,i,l,d,p,g):function(y,S,w,P,T){const D=new Array(T?P+1:P);for(let I=0;I<2*P;I+=2){const N=2*S[w+I/2];D[I/2]=new A(y[N],y[N+1])}return T&&(D[D.length-1]=D[0]),D}(t,i,l,d,p)}function eh(o,t,i,l){const d=new Array(l?i+1:i);for(let p=0;p<2*i;p+=2)d[p/2]=new A(o[t+p],o[t+p+1]);return l&&(d[d.length-1]=d[0]),d}(function(o){o[o.POINT=0]="POINT",o[o.LINESTRING=1]="LINESTRING",o[o.POLYGON=2]="POLYGON",o[o.MULTIPOINT=3]="MULTIPOINT",o[o.MULTILINESTRING=4]="MULTILINESTRING",o[o.MULTIPOLYGON=5]="MULTIPOLYGON"})(en||(en={})),function(o){o[o.POINT=0]="POINT",o[o.LINESTRING=1]="LINESTRING",o[o.POLYGON=2]="POLYGON"}(OE||(OE={})),function(o){o[o.MORTON=0]="MORTON",o[o.VEC_2=1]="VEC_2",o[o.VEC_3=2]="VEC_3"}(_l||(_l={}));class GE{constructor(t,i,l,d,p){this._vertexBufferType=t,this._topologyVector=i,this._vertexOffsets=l,this._vertexBuffer=d,this._mortonSettings=p}get vertexBufferType(){return this._vertexBufferType}get topologyVector(){return this._topologyVector}get vertexOffsets(){return this._vertexOffsets}get vertexBuffer(){return this._vertexBuffer}getSimpleEncodedVertex(t){const i=this.vertexOffsets?2*this.vertexOffsets[t]:2*t;return[this.vertexBuffer[i],this.vertexBuffer[i+1]]}getVertex(t){if(this.vertexOffsets&&this.mortonSettings){const l=sb(this.vertexBuffer[this.vertexOffsets[t]],this.mortonSettings.numBits,this.mortonSettings.coordinateShift);return[l.x,l.y]}const i=this.vertexOffsets?2*this.vertexOffsets[t]:2*t;return[this.vertexBuffer[i],this.vertexBuffer[i+1]]}getGeometries(){return function(t){const i=new Array(t.numGeometries);let l=1,d=1,p=1,g=0,y=0,S=0;const w=t.mortonSettings,P=t.topologyVector,T=P.geometryOffsets,D=P.partOffsets,I=P.ringOffsets,N=t.vertexOffsets,B=!N||N.length===0,q=t.containsPolygonGeometry(),W=t.vertexBuffer;for(let ee=0;ee<t.numGeometries;ee++)switch(t.geometryType(ee)){case en.POINT:{let X,te;if(B)X=W[y++],te=W[y++];else if(t.vertexBufferType===_l.MORTON){const le=sb(W[N[S++]],w.numBits,w.coordinateShift);X=le.x,te=le.y}else{const le=2*N[S++];X=W[le],te=W[le+1]}i[g++]=[[new A(X,te)]],T&&p++,D&&l++,I&&d++}break;case en.MULTIPOINT:{const X=T[p]-T[p-1];p++;const te=new Array(X);if(B)for(let le=0;le<X;le++){const he=W[y++],Se=W[y++];te[le]=new A(he,Se)}else for(let le=0;le<X;le++){const he=2*N[S++];te[le]=new A(W[he],W[he+1])}i[g++]=te.map(le=>[le]),l+=X,d+=X}break;case en.LINESTRING:{let X,te;q?(X=I[d]-I[d-1],d++):X=D[l]-D[l-1],l++,B?(te=eh(W,y,X,!1),y+=2*X):(te=Jd(t.vertexBufferType,W,N,S,X,!1,w),S+=X),i[g++]=[te],T&&p++}break;case en.POLYGON:{const X=D[l]-D[l-1];l++;const te=new Array(X-1);let le,he=I[d]-I[d-1];if(d++,B){le=eh(W,y,he,!0),y+=2*he;for(let Se=0;Se<te.length;Se++)he=I[d]-I[d-1],d++,te[Se]=eh(W,y,he,!0),y+=2*he}else{le=Jd(t.vertexBufferType,W,N,S,he,!0,w),S+=he;for(let Se=0;Se<te.length;Se++)he=I[d]-I[d-1],d++,te[Se]=Jd(t.vertexBufferType,W,N,S,he,!0,w),S+=he}i[g++]=[le].concat(te),T&&p++}break;case en.MULTILINESTRING:{const X=T[p]-T[p-1];p++;const te=new Array(X);for(let le=0;le<X;le++){let he;if(q?(he=I[d]-I[d-1],d++):he=D[l]-D[l-1],l++,B)te[le]=eh(W,y,he,!1),y+=2*he;else{const Se=Jd(t.vertexBufferType,W,N,S,he,!1,w);te[le]=Se,S+=he}}i[g++]=te}break;case en.MULTIPOLYGON:{const X=T[p]-T[p-1];p++;const te=new Array(X);for(let le=0;le<X;le++){const he=D[l]-D[l-1];let Se;l++;const Ee=new Array(he-1),Oe=I[d]-I[d-1];d++,B?(Se=eh(W,y,Oe,!0),y+=2*Oe):(Se=Jd(t.vertexBufferType,W,N,S,Oe,!0,w),S+=Oe);for(let ke=0;ke<Ee.length;ke++){const Be=I[d]-I[d-1];d++,B?(Ee[ke]=eh(W,y,Be,!0),y+=2*Be):(Ee[ke]=Jd(t.vertexBufferType,W,N,S,Be,!0,w),S+=Be)}te[le]=[Se].concat(Ee)}i[g++]=te.flat()}break;default:throw new Error("The specified geometry type is currently not supported.")}return i}(this)}get mortonSettings(){return this._mortonSettings}}class qE extends GE{constructor(t,i,l,d,p,g,y){super(l,d,p,g,y),this._numGeometries=t,this._geometryType=i}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsPolygonGeometry(){return this._geometryType===en.POLYGON||this._geometryType===en.MULTIPOLYGON}containsSingleGeometryType(){return!0}}class WE extends GE{constructor(t,i,l,d,p,g){super(t,l,d,p,g),this._geometryTypes=i}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsPolygonGeometry(){for(let t=0;t<this.numGeometries;t++)if(this.geometryType(t)===en.POLYGON||this.geometryType(t)===en.MULTIPOLYGON)return!0;return!1}containsSingleGeometryType(){return!1}}class ZE{constructor(t,i,l,d){this._triangleOffsets=t,this._indexBuffer=i,this._vertexBuffer=l,this._topologyVector=d}get triangleOffsets(){return this._triangleOffsets}get indexBuffer(){return this._indexBuffer}get vertexBuffer(){return this._vertexBuffer}get topologyVector(){return this._topologyVector}getGeometries(){if(!this._topologyVector)throw new Error("Cannot convert GpuVector to coordinates without topology information");const t=new Array(this.numGeometries),i=this._topologyVector,l=i.partOffsets,d=i.ringOffsets,p=i.geometryOffsets;let g=0,y=1,S=1,w=1;for(let P=0;P<this.numGeometries;P++)switch(this.geometryType(P)){case en.POLYGON:{const T=l[y]-l[y-1];y++;const D=[];for(let I=0;I<T;I++){const N=d[S]-d[S-1];S++;const B=[];for(let q=0;q<N;q++){const W=this._vertexBuffer[g++],ee=this._vertexBuffer[g++];B.push(new A(W,ee))}B.length>0&&B.push(B[0]),D.push(B)}t[P]=D,p&&w++}break;case en.MULTIPOLYGON:{const T=p[w]-p[w-1];w++;const D=[];for(let I=0;I<T;I++){const N=l[y]-l[y-1];y++;for(let B=0;B<N;B++){const q=d[S]-d[S-1];S++;const W=[];for(let ee=0;ee<q;ee++){const X=this._vertexBuffer[g++],te=this._vertexBuffer[g++];W.push(new A(X,te))}W.length>0&&W.push(W[0]),D.push(W)}}t[P]=D}}return t}[Symbol.iterator](){return null}}function HE(o,t,i,l,d,p){return new vF(o,t,i,l,d,p)}class vF extends ZE{constructor(t,i,l,d,p,g){super(l,d,p,g),this._numGeometries=t,this._geometryType=i}geometryType(t){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function XE(o,t,i,l,d){return new xF(o,t,i,l,d)}class xF extends ZE{constructor(t,i,l,d,p){super(i,l,d,p),this._geometryTypes=t}geometryType(t){return this._geometryTypes[t]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function bF(o,t,i,l,d){const p=Jn(o,i);let g,y,S,w;if(Zy(p,l,o,i)===hr.CONST){const ee=ob(o,i,p);let X,te,le,he;for(let Se=0;Se<t-1;Se++){const Ee=Jn(o,i);switch(Ee.physicalStreamType){case Pn.LENGTH:switch(Ee.logicalStreamType.lengthType){case Ii.GEOMETRIES:X=vl(o,i,Ee);break;case Ii.PARTS:te=vl(o,i,Ee);break;case Ii.RINGS:le=vl(o,i,Ee);break;case Ii.TRIANGLES:he=vl(o,i,Ee)}break;case Pn.OFFSET:switch(Ee.logicalStreamType.offsetType){case tu.VERTEX:g=Mi(o,i,Ee);break;case tu.INDEX:w=Mi(o,i,Ee)}break;case Pn.DATA:No.VERTEX===Ee.logicalStreamType.dictionaryType?y=ib(o,i,Ee):(S={numBits:Ee.numBits,coordinateShift:Ee.coordinateShift},y=Mi(o,i,Ee))}}return w?X!==void 0||te!==void 0?HE(l,ee,he,w,y,{geometryOffsets:X,partOffsets:te,ringOffsets:le}):HE(l,ee,he,w,y):S===void 0?function(Se,Ee,Oe,ke,Be){return new qE(Se,Ee,_l.VEC_2,Oe,ke,Be)}(l,ee,{geometryOffsets:X,partOffsets:te,ringOffsets:le},g,y):function(Se,Ee,Oe,ke,Be,Ve){return new qE(Se,Ee,_l.MORTON,Oe,ke,Be,Ve)}(l,ee,{geometryOffsets:X,partOffsets:te,ringOffsets:le},g,y,S)}const P=Mi(o,i,p);let T,D,I,N,B,q,W;for(let ee=0;ee<t-1;ee++){const X=Jn(o,i);switch(X.physicalStreamType){case Pn.LENGTH:switch(X.logicalStreamType.lengthType){case Ii.GEOMETRIES:T=Mi(o,i,X
458);break;case Ii.PARTS:D=Mi(o,i,X);break;case Ii.RINGS:I=Mi(o,i,X);break;case Ii.TRIANGLES:N=vl(o,i,X)}break;case Pn.OFFSET:switch(X.logicalStreamType.offsetType){case tu.VERTEX:g=Mi(o,i,X);break;case tu.INDEX:w=Mi(o,i,X)}break;case Pn.DATA:No.VERTEX===X.logicalStreamType.dictionaryType?y=ib(o,i,X):(S={numBits:X.numBits,coordinateShift:X.coordinateShift},y=Mi(o,i,X))}}return T?(B=ab(P,T,2),D&&I?(q=KE(P,B,D,!1),W=function(ee,X,te,le){const he=new Uint32Array(te[te.length-1]+1);let Se=0;he[0]=Se;let Ee=1,Oe=1,ke=0;for(let Be=0;Be<ee.length;Be++){const Ve=ee[Be],Fe=X[Be+1]-X[Be];if(Ve!==0&&Ve!==3)for(let Le=0;Le<Fe;Le++){const Ye=te[Ee]-te[Ee-1];Ee++;for(let st=0;st<Ye;st++)Se=he[Oe++]=Se+le[ke++]}else for(let Le=0;Le<Fe;Le++)he[Oe++]=++Se,Ee++}return he}(P,B,q,I)):D&&(q=function(ee,X,te){const le=new Uint32Array(X[X.length-1]+1);let he=0;le[0]=he;let Se=1,Ee=0;for(let Oe=0;Oe<ee.length;Oe++){const ke=ee[Oe],Be=X[Oe+1]-X[Oe];if(ke===4||ke===1)for(let Ve=0;Ve<Be;Ve++)he=le[Se++]=he+te[Ee++];else for(let Ve=0;Ve<Be;Ve++)le[Se++]=++he}return le}(P,B,D))):D&&I?(q=ab(P,D,1),W=KE(P,q,I,!0)):D&&(q=ab(P,D,0)),w&&!q?XE(P,N,w,y):w?XE(P,N,w,y,{geometryOffsets:B,partOffsets:q,ringOffsets:W}):S===void 0?function(ee,X,te,le){return new WE(_l.VEC_2,ee,X,te,le)}(P,{geometryOffsets:B,partOffsets:q,ringOffsets:W},g,y):function(ee,X,te,le,he){return new WE(_l.MORTON,ee,X,te,le,he)}(P,{geometryOffsets:B,partOffsets:q,ringOffsets:W},g,y,S)}function ab(o,t,i){const l=new Uint32Array(o.length+1);let d=0;l[0]=d;let p=0;for(let g=0;g<o.length;g++)d=l[g+1]=d+(o[g]>i?t[p++]:1);return l}function KE(o,t,i,l){const d=new Uint32Array(t[t.length-1]+1);let p=0;d[0]=p;let g=1,y=0;for(let S=0;S<o.length;S++){const w=o[S],P=t[S+1]-t[S];if(w===5||w===2||l&&(w===4||w===1))for(let T=0;T<P;T++)p=d[g++]=p+i[y++];else for(let T=0;T<P;T++)d[g++]=++p}return d}class wF extends Hd{constructor(t,i,l){super(t,i.getBuffer(),l),this.dataVector=i}getValueFromBuffer(t){return this.dataVector.get(t)}}class SF extends Wy{getValueFromBuffer(t){return this.dataBuffer[t]}}class YE extends Hd{constructor(t,i,l,d){super(t,d?BigInt64Array.of(i):BigUint64Array.of(i),l)}getValueFromBuffer(t){return this.dataBuffer[0]}}function Uf(o,t,i,l,d){const p=function(g,y,S,w){const P=new Uint8Array(y);let T=0;const D=w.get()+S;for(;T<y&&!(w.get()>=D);){const I=g[w.increment()];if(I<=127){const N=I+3,B=g[w.increment()],q=Math.min(T+N,y);P.fill(B,T,q),T=q}else{const N=256-I;for(let B=0;B<N&&T<y;B++)P[T++]=g[w.increment()]}}return w.set(D),P}(o,Math.ceil(t/8),i,l);return d?function(g,y,S){if(!S)return g;const w=S.size(),P=new Bo(g,y),T=new Bo(new Uint8Array(Math.ceil(w/8)),w);let D=0;for(let I=0;I<w;I++){const N=!!S.get(I)&&P.get(D++);T.set(I,N)}return T.getBuffer()}(p,t,d):p}const TF=new TextDecoder;function lb(o,t,i){return i-t>=12?TF.decode(o.subarray(t,i)):function(l,d,p){let g="",y=d;for(;y<p;){const S=l[y];let w,P,T,D=null,I=S>239?4:S>223?3:S>191?2:1;if(y+I>p)break;I===1?S<128&&(D=S):I===2?(w=l[y+1],(192&w)==128&&(D=(31&S)<<6|63&w,D<=127&&(D=null))):I===3?(w=l[y+1],P=l[y+2],(192&w)==128&&(192&P)==128&&(D=(15&S)<<12|(63&w)<<6|63&P,(
458D<=2047||D>=55296&&D<=57343)&&(D=null))):I===4&&(w=l[y+1],P=l[y+2],T=l[y+3],(192&w)==128&&(192&P)==128&&(192&T)==128&&(D=(15&S)<<18|(63&w)<<12|(63&P)<<6|63&T,(D<=65535||D>=1114112)&&(D=null))),D===null?(D=65533,I=1):D>65535&&(D-=65536,g+=String.fromCharCode(D>>>10&1023|55296),D=56320|1023&D),g+=String.fromCharCode(D),y+=I}return g}(o,t,i)}class cb extends Hd{constructor(t,i,l,d){super(t,l,d),this.offsetBuffer=i}}class QE extends cb{constructor(t,i,l,d){super(t,i,l,d??i.length-1)}getValueFromBuffer(t){return lb(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class th extends cb{constructor(t,i,l,d,p){super(t,l,d,p??i.length),this.indexBuffer=i,this.indexBuffer=i}getValueFromBuffer(t){const i=this.indexBuffer[t];return lb(this.dataBuffer,this.offsetBuffer[i],this.offsetBuffer[i+1])}}class JE extends cb{constructor(t,i,l,d,p,g,y){super(t,l,d,y),this.indexBuffer=i,this.symbolOffsetBuffer=p,this.symbolTableBuffer=g}getValueFromBuffer(t){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(l,d,p){const g=[],y=new Array(d.length).fill(0);for(let S=1;S<d.length;S++)y[S]=y[S-1]+d[S-1];for(let S=0;S<p.length;S++)if(p[S]===255)g.push(p[++S]);else{const w=d[p[S]],P=y[p[S]];for(let T=0;T<w;T++)g.push(l[P+T])}return new Uint8Array(g)}(this.symbolTableBuffer,this.symbolLengthBuffer,this.dataBuffer));const i=this.indexBuffer[t];return lb(this.decodedDictionary,this.offsetBuffer[i],this.offsetBuffer[i+1])}offsetToLengthBuffer(t){const i=new Uint32Array(t.length-1);let l=t[0];for(let d=1;d<t.length;d++){const p=t[d];i[d-1]=p-l,l=p}return i}}function EF(o,t,i,l,d,p){return i.type==="scalarType"?function(g,y,S,w,P,T){let D=null;if(g===0)return null;if(T.nullable){const N=Jn(y,S),B=N.numValues,q=S.get(),W=Uf(y,B,N.byteLength,S);S.set(q+N.byteLength),D=new Bo(W,N.numValues)}const I=D??w;switch(P.physicalType){case 4:case 3:return function(N,B,q,W,ee){const X=Jn(N,B),te=Zy(X,ee,N,B),le=W.physicalType===3;if(te===hr.FLAT){const Se=$f(ee)?ee:void 0,Ee=le?ib(N,B,X,0,Se):Mi(N,B,X,0,Se);return new Zx(q.name,Ee,ee)}if(te===hr.SEQUENCE){const Se=FE(N,B,X);return new Xx(q.name,Se[0],Se[1],X.numRleValues)}const he=le?function(Se,Ee,Oe){const ke=Qd(Se,Ee,Oe);return ke.length===1?rr(ke[0]):function(Be){return rr(Be[1])}(ke)}(N,B,X):ob(N,B,X);return new Kx(q.name,he,ee,le)}(y,S,T,P,I);case 9:return function(N,B,q,W,ee){let X=null,te=null,le=null,he=null,Se=null,Ee=ee??null,Oe=null,ke=null;for(let Be=0;Be<W;Be++){const Ve=Jn(B,q);switch(Ve.physicalStreamType){case Pn.PRESENT:{const Fe=Uf(B,Ve.numValues,Ve.byteLength,q),Le=new Bo(Fe,Ve.numValues);Ee=ee??Le;break}case Pn.OFFSET:te=Mi(B,q,Ve,0,Ee);break;case Pn.LENGTH:{const Fe=vl(B,q,Ve);Ii.DICTIONARY===Ve.logicalStreamType.lengthType?X=Fe:Ii.SYMBOL===Ve.logicalStreamType.lengthType?he=Fe:Oe=Fe;break}case Pn.DATA:{const Fe=B.subarray(q.get(),q.get()+Ve.byteLength);q.add(Ve.byteLength);const Le=Ve.logicalStreamType.dictionaryType;No.FSST===Le?Se=Fe:No.SINGLE===Le||No.SHARED===Le?le=Fe:No.NONE===Le&&(ke=Fe);break}}}return function(Be,Ve,Fe,Le,Ye,st,tt){return Ve?new JE(Be,Fe,Le,Ye,st,Ve,tt):null}(N,Se,te,X,le,he,Ee)??function(Be,Ve,Fe,Le,Ye){return Ve?Ye?new th(Be,Fe,Le,Ve,Ye):new th(Be,Fe,Le,Ve):null}(N,le,te,X,Ee)??function(Be,Ve,Fe,Le,Ye){if(!Ve||!Fe)return null;if(Le)return Ye?new th(Be,Le,Ve,Fe,Ye):new th(Be,Le,Ve,Fe);if(Ye&&Ye.size()!==Ve.length-1){const st=new Uint32Array(Ye.size());let tt=0;for(let Qe=0;Qe<Ye.size();Qe++)st[Qe]=Ye.get(Qe)?tt++:0;return new th(Be,st,Ve,Fe,Ye)}return Ye?new QE(Be,Ve,Fe,Ye):new QE(Be,Ve,Fe)}(N,Oe,ke,te,Ee)}(T.name,y,S,T.nullable?g-1:g,D);case 0:return function(N,B,q,W,ee){const X=Jn(N,B),te=X.numValues,le=B.get(),he=$f(ee)?ee:void 0,Se=Uf(N,te,X.byteLength,B,he);B.set(le+X.byteLength);const Ee=new Bo(Se,te);return new wF(q.name,Ee,ee)}(y,S,T,0,I);case 6:case 5:return function(N,B,q,W,ee){const X=Jn(N,B),te=Zy(X,W,N,B,"int64"),le=ee.physicalType===5;if(te===hr.FLAT){const Se=$f(W)?W:void 0,Ee=le?function(Oe,ke,Be,Ve){return function(Fe,Le,Ye){let st;switch(Le.logicalLevelTechnique1){case Ot.DELTA:if(Le.logicalLevelTechnique2===Ot.RLE){const tt=Le;if(!Ye)return function(Qe,wt,Vt){const qt=new BigInt64Array(Vt);let er=0,In=0n;for(let Tr=0;Tr<wt;Tr++){const Hr=Number(Qe[Tr]),tn=Qn(Qe[Tr+wt]);for(let pr=0;pr<Hr;pr++)In+=tn,qt[er++]=In}return qt}(Fe,tt.runs,tt.numRleValues);st=zE(Fe=rb(Fe,tt.runs,tt.numRleValues))}else st=zE(Fe);break;case Ot.RLE:st=function(tt,Qe,wt){if(wt===void 0){wt=0;for(let er=0;er<Qe;er++)wt+=Number(tt[er])}const Vt=new BigInt64Array(wt);let qt=0;for(let er=0;er<Qe;er++){const In=Number(tt[er]);let Tr=tt[er+Qe];Tr=Qn(Tr),Vt.fill(Tr,qt,qt+In),qt+=In}return Vt}(Fe,Le.runs,Le.numRleValues);break;case Ot.NONE:st=function(tt){const Qe=new BigInt64Array(tt.length);for(let wt=0;wt<tt.length;wt++)Qe[wt]=Qn(tt[wt]);return Qe}(Fe);break;default:throw new Error(`The specified Logical level technique is not supported: ${Le.logicalLevelTechnique1}`)}return Ye?Yd(st,Ye,0n):st}(Xd(Oe,ke,Be.numValues),Be,Ve)}(N,B,X,Se):NE(N,B,X,Se);return new VE(q.name,Ee,W)}if(te===hr.SEQUENCE){const Se=jE(N,B,X);return new UE(q.name,Se[0],Se[1],X.numRleValues)}const he=le?function(Se,Ee,Oe){const ke=Xd(Se,Ee,Oe.numValues);return ke.length===1?Qn(ke[0]):function(Be){return Qn(Be[1])}(ke)}(N,B,X):BE(N,B,X);
458return new YE(q.name,he,W,le)}(y,S,T,I,P);case 7:return function(N,B,q,W){const ee=Jn(N,B),X=$f(W)?W:void 0,te=function(le,he,Se,Ee){const Oe=he.get(),ke=Oe+Se*Float32Array.BYTES_PER_ELEMENT,Be=new Uint8Array(le.subarray(Oe,ke)).buffer,Ve=new Float32Array(Be);return he.set(ke),Ee?Yd(Ve,Ee,0):Ve}(N,B,ee.numValues,X);return new SF(q.name,te,W)}(y,S,T,I);case 8:return function(N,B,q,W){const ee=Jn(N,B),X=$f(W)?W:void 0,te=function(le,he,Se,Ee){const Oe=he.get(),ke=Oe+Se*Float64Array.BYTES_PER_ELEMENT,Be=new Uint8Array(le.subarray(Oe,ke)).buffer,Ve=new Float64Array(Be);return he.set(ke),Ee?Yd(Ve,Ee,0):Ve}(N,B,ee.numValues,X);return new Hx(q.name,te,W)}(y,S,T,I);default:throw new Error(`The specified data type for the field is currently not supported: ${P}`)}}(l,o,t,d,i.scalarType,i):l===0?null:function(g,y,S,w){let P=null,T=null,D=null,I=null,N=!1;for(;!N;){const ee=Jn(g,y);switch(ee.physicalStreamType){case Pn.LENGTH:Ii.DICTIONARY===ee.logicalStreamType.lengthType?P=vl(g,y,ee):D=vl(g,y,ee);break;case Pn.DATA:No.SINGLE===ee.logicalStreamType.dictionaryType||No.SHARED===ee.logicalStreamType.dictionaryType?(T=g.subarray(y.get(),y.get()+ee.byteLength),N=!0):I=g.subarray(y.get(),y.get()+ee.byteLength),y.add(ee.byteLength)}}const B=S.complexType.children,q=[];let W=0;for(const ee of B){const X=Bn(g,y,1)[0];if(X===0)continue;const te=ee.name?`${S.name}${ee.name}`:S.name;if(X!==2||ee.type!=="scalarField"||ee.scalarField.physicalType!==9)throw new Error("Currently only optional string fields are implemented for a struct.");const le=Jn(g,y),he=Uf(g,le.numValues,le.byteLength,y),Se=Jn(g,y),Ee=Mi(g,y,Se,0,Se.decompressedCount!==w?new Bo(he,le.numValues):void 0);q[W++]=I?new JE(te,Ee,P,T,D,I,new Bo(he,le.numValues)):new th(te,Ee,P,T,new Bo(he,le.numValues))}return q}(o,t,i,d)}function $f(o){return o instanceof Bo}function eP(o){switch(o){case 0:case 1:case 2:case 3:{const t={};t.nullable=!!(1&o),t.columnScope=0;const i={type:"logicalType",logicalType:0};return i.longID=!!(2&o),t.scalarType=i,t.type="scalarType",t}case 4:{const t={nullable:!1,columnScope:0},i={type:"physicalType",physicalType:0};return t.type="complexType",t.complexType=i,t}case 30:{const t={nullable:!1,columnScope:0},i={type:"physicalType",physicalType:1};return t.type="complexType",t.complexType=i,t}default:return function(t){let i;switch(t){case 10:case 11:i=0;break;case 12:case 13:i=1;break;case 14:case 15:i=2;break;case 16:case 17:i=3;break;case 18:case 19:i=4;break;case 20:case 21:i=5;break;case 22:case 23:i=6;break;case 24:case 25:i=7;break;case 26:case 27:i=8;break;case 28:case 29:i=9;break;default:return null}const l={};l.nullable=!!(1&t),l.columnScope=0;const d={type:"physicalType"};return d.physicalType=i,l.type="scalarType",l.scalarType=d,l}(o)}}function tP(o){return o>=10}function rP(o){return o===30}function PF(o){if(o.type==="scalarType"){const t=o.scalarType;if(t.type==="physicalType")switch(t.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(t.type==="logicalType")return!1}else if(o.type==="complexType"){const t=o.complexType;if(t.type==="physicalType")switch(t.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",o),!1}function CF(o){var t;return o.type==="complexType"&&((t=o.complexType)==null?void 0:t.type)==="physicalType"&&o.complexType.physicalType===0}const IF=new TextDecoder;function ub(o,t){const i=Bn(o,t,1)[0];if(i===0)return"";const l=t.get(),d=o.subarray(l,l+i);return t.add(i),IF.decode(d)}function nP(o,t){const i=Bn(o,t,1)[0]>>>0;if(i<10||i>30)throw new Error(`Unsupported field type code ${i}. Supported: 10-29(scalars), 30(STRUCT)`);const l=eP(i);if(tP(i)&&(l.name=ub(o,t)),rP(i)){const d=Bn(o,t,1)[0]>>>0;l.complexType.children=new Array(d);for(let p=0;p<d;p++)l.complexType.children[p]=nP(o,t)}return function(d){return{name:d.name,nullable:d.nullable,scalarField:d.scalarType,complexField:d.complexType,type:d.type==="scalarType"?"scalarField":"complexField"}}(l)}function MF(o,t){const i=Bn(o,t,1)[0]>>>0,l=eP(i);
458if(!l)throw new Error(`Unsupported column type code ${i}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(tP(i)?l.name=ub(o,t):i>=0&&i<=3?l.name="id":i===4&&(l.name="geometry"),rP(i)){const d=Bn(o,t,1)[0]>>>0,p=l.complexType;p.children=new Array(d);for(let g=0;g<d;g++)p.children[g]=nP(o,t)}return l}function AF(o,t){const i={featureTables:[]},l={};l.name=ub(o,t);const d=Bn(o,t,1)[0]>>>0,p=Bn(o,t,1)[0]>>>0;l.columns=new Array(p);for(let g=0;g<p;g++)l.columns[g]=MF(o,t);return i.featureTables.push(l),[i,d]}function RF(o,t,i,l,d,p,g=!1){const y=t.scalarType;if(!y||y.type!=="logicalType"||y.logicalType!==0)throw new Error(`ID column must be a logical ID scalar type: ${l}`);const S=y.longID?6:4,w=typeof p=="number"?void 0:p,P=Zy(d,p,o,i,S===6?"int64":"int32");if(S===4)switch(P){case hr.FLAT:{const T=Mi(o,i,d,0,w);return new Zx(l,T,p)}case hr.SEQUENCE:{const T=FE(o,i,d);return new Xx(l,T[0],T[1],d.numRleValues)}case hr.CONST:{const T=ob(o,i,d);return new Kx(l,T,p,!1)}}switch(P){case hr.FLAT:{if(g){const D=function(I,N,B){const q=function(W,ee,X){const te=new Float64Array(X);for(let le=0;le<X;le++)te[le]=_F(W,ee);return te}(I,N,B.numValues);return function(W,ee){switch(ee.logicalLevelTechnique1){case Ot.DELTA:return ee.logicalLevelTechnique2===Ot.RLE&&(W=DE(W,ee.runs,ee.numRleValues)),function(X){X[0]=Kd(X[0]);const te=X.length/4*4;let le=1;if(te>=4)for(;le<te-4;le+=4){const he=X[le+1],Se=X[le+2],Ee=X[le+3];X[le]=Kd(X[le])+X[le-1],X[le+1]=Kd(he)+X[le],X[le+2]=Kd(Se)+X[le+1],X[le+3]=Kd(Ee)+X[le+2]}for(;le!==X.length;++le)X[le]=Kd(X[le])+X[le-1]}(W),W;case Ot.RLE:return function(X,te){return DE(X,te.runs,te.numRleValues)}(W,ee);case Ot.NONE:return W;default:throw new Error(`The specified Logical level technique is not supported: ${ee.logicalLevelTechnique1}`)}}(q,B)}(o,i,d);return new Hx(l,D,p)}const T=NE(o,i,d,w);return new VE(l,T,p)}case hr.SEQUENCE:{const T=jE(o,i,d);return new UE(l,T[0],T[1],d.numRleValues)}case hr.CONST:{const T=BE(o,i,d);return new YE(l,T,p,!1)}}throw new Error("Vector type not supported for id column.")}class kF{constructor(t,i){var l;switch(this._featureData=t,this.properties=this._featureData.properties||{},(l=this._featureData.geometry)===null||l===void 0?void 0:l.type){case en.POINT:case en.MULTIPOINT:this.type=1;break;case en.LINESTRING:case en.MULTILINESTRING:this.type=2;break;case en.POLYGON:case en.MULTIPOLYGON:this.type=3;break;default:this.type=0}this.extent=i,this.id=Number(this._featureData.id)}loadGeometry(){const t=[];for(const i of this._featureData.geometry.coordinates){const l=[];for(const d of i)l.push(new A(d.x,d.y));t.push(l)}return t}}class DF{constructor(t){this.features=[],this.featureTable=t,this.name=t.name,this.extent=t.extent,this.version=2,this.features=t.getFeatures(),this.length=this.features.length}feature(t){return new kF(this.features[t],this.extent)}}class iP{constructor(t){this.layers={};const i=function(l,d,p=!0){var w;const g=new RE(0),y=[];for(;g.get()<l.length;){const P=Bn(l,g,1)[0]>>>0,T=g.get()+P;if(T>l.length)throw new Error(`Block overruns tile: ${T} > ${l.length}`);if(Bn(l,g,1)[0]>>>0!=1){g.set(T);continue}const[D,I]=AF(l,g),N=D.featureTables[0];let B=null,q=null;const W=[];let ee=0;for(const te of N.columns){const le=te.name;if((S=te).type==="scalarType"&&((w=S.scalarType)==null?void 0:w.type)==="logicalType"&&S.scalarType.logicalType===0){let he=null;if(te.nullable){const Ee=Jn(l,g),Oe=g.get(),ke=Uf(l,Ee.numValues,Ee.byteLength,g);g.set(Oe+Ee.byteLength),he=new Bo(ke,Ee.numValues)}const Se=Jn(l,g);ee=he?he.size():Se.decompressedCount,B=RF(l,te,g,le,Se,he??ee,p)}else if(CF(te)){const he=Bn(l,g,1)[0];if(ee===0){const Se=g.get();ee=Jn(l,g).decompressedCount,g.set(Se)}q=bF(l,he,g,ee)}else{const he=PF(te)?Bn(l,g,1)[0]:1;if(he===0)continue;const Se=EF(l,g,te,he,ee);if(Se)if(Array.isArray(Se))for(const Ee of Se)W.push(Ee);else W.push(Se)}}const X=new cF(N.name,q,B,W,I);y.push(X),g.set(T)}var S;return y}(new Uint8Array(t));this.layers=i.reduce((l,d)=>Object.assign(Object.assign({},l),{[d.name]:new DF(d)}),{})}}class LF{constructor(t,i){this.feature=t,this.type=t.type,this.properties=t.tags?t.tags:{}
458,this.extent=i,"id"in t&&(typeof t.id=="string"?this.id=parseInt(t.id,10):typeof t.id!="number"||isNaN(t.id)||(this.id=t.id))}loadGeometry(){const t=[],i=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(const l of i){const d=[];for(const p of l)d.push(new A(p[0],p[1]));t.push(d)}return t}}const Gf="_geojsonTileLayer";function zF(o,t,i=""){t.writeVarintField(15,o.version||1),t.writeStringField(1,o.name||""),t.writeVarintField(5,o.extent||4096);const l={jsonPrefix:i,keys:[],values:[],keycache:{},valuecache:{}};for(let g=0;g<o.length;g++)l.feature=o.feature(g),t.writeMessage(2,OF,l);const d=l.keys;for(const g of d)t.writeStringField(3,g);const p=l.values;for(const g of p)t.writeMessage(4,NF,g)}function OF(o,t){if(!o.feature)return;const i=o.feature;i.id!==void 0&&t.writeVarintField(1,i.id),t.writeMessage(2,FF,o),t.writeVarintField(3,i.type),t.writeMessage(4,jF,i)}function FF(o,t){var i;for(const l in(i=o.feature)==null?void 0:i.properties){let d=o.feature.properties[l],p=o.keycache[l];if(d==null)continue;p===void 0&&(o.keys.push(l),p=o.keys.length-1,o.keycache[l]=p),t.writeVarint(p),typeof d!="string"&&typeof d!="boolean"&&typeof d!="number"&&(d=o.jsonPrefix+JSON.stringify(d));const g=typeof d+":"+d;let y=o.valuecache[g];y===void 0&&(o.values.push(d),y=o.values.length-1,o.valuecache[g]=y),t.writeVarint(y)}}function db(o,t){return(t<<3)+(7&o)}function oP(o){return o<<1^o>>31}function jF(o,t){const i=o.loadGeometry(),l=o.type;let d=0,p=0;for(const g of i){let y=1;l===1&&(y=g.length),t.writeVarint(db(1,y));const S=l===3?g.length-1:g.length;for(let w=0;w<S;w++){w===1&&l!==1&&t.writeVarint(db(2,S-1));const P=g[w].x-d,T=g[w].y-p;t.writeVarint(oP(P)),t.writeVarint(oP(T)),d+=P,p+=T}
458o.type===3&&t.writeVarint(db(7,1))}}function NF(o,t){const i=typeof o;i==="string"?t.writeStringField(1,o):i==="boolean"?t.writeBooleanField(7,o):i==="number"&&(o%1!=0?t.writeDoubleField(3,o):o<0?t.writeSVarintField(6,o):t.writeVarintField(5,o))}class sP{constructor(t,i){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Do(Pe,16,0),this.grid3D=new Do(Pe,16,0),this.featureIndexArray=new oe,this.promoteId=i}insert(t,i,l,d,p,g){const y=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(l,d,p);const S=g?this.grid3D:this.grid;for(const w of i){const P=[1/0,1/0,-1/0,-1/0];for(const T of w)P[0]=Math.min(P[0],T.x),P[1]=Math.min(P[1],T.y),P[2]=Math.max(P[2],T.x),P[3]=Math.max(P[3],T.y);P[0]<Pe&&P[1]<Pe&&P[2]>=0&&P[3]>=0&&S.insert(y,P[0],P[1],P[2],P[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new DT(new Vy(this.rawTileData)).layers:new iP(this.rawTileData).layers,this.sourceLayerCoder=new IE(this.vtLayers?Object.keys(this.vtLayers).sort():[Gf])),this.vtLayers}query(t,i,l,d){this.loadVTLayers();const p=t.params,g=Pe/t.tileSize/t.scale,y=Dc(p.filter,p.globalState),S=t.queryGeometry,w=t.queryPadding*g,P=eu.fromPoints(S),T=this.grid.query(P.minX-w,P.minY-w,P.maxX+w,P.maxY+w),D=eu.fromPoints(t.cameraQueryGeometry).expandBy(w),I=this.grid3D.query(D.minX,D.minY,D.maxX,D.maxY,(q,W,ee,X)=>function(te,le,he,Se,Ee){for(const ke of te)if(le<=ke.x&&he<=ke.y&&Se>=ke.x&&Ee>=ke.y)return!0;const Oe=[new A(le,he),new A(le,Ee),new A(Se,Ee),new A(Se,he)];if(te.length>2){for(const ke of Oe)if(Od(te,ke))return!0}for(let ke=0;ke<te.length-1;ke++)if(gO(te[ke],te[ke+1],Oe))return!0;return!1}(t.cameraQueryGeometry,q-w,W-w,ee+w,X+w));for(const q of I)T.push(q);T.sort(BF);const N={};let B;for(const q of T){if(q===B)continue;B=q;const W=this.featureIndexArray.get(q);let ee=null;this.loadMatchingFeature(N,W.bucketIndex,W.sourceLayerIndex,W.featureIndex,y,p.layers,p.availableImages,i,l,d,(X,te,le)=>(ee||(ee=_s(X)),te.queryIntersectsFeature({queryGeometry:S,feature:X,featureState:le,geometry:ee,zoom:this.z,transform:t.transform,pixelsToTileUnits:g,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return N}loadMatchingFeature(t,i,l,d,p,g,y,S,w,P,T){const D=this.bucketLayerIDs[i];if(g&&!D.some(q=>g.has(q)))return;const I=this.sourceLayerCoder.decode(l),N=this.vtLayers[I].feature(d);if(p.needGeometry){const q=vs(N,!0);if(!p.filter(new or(this.tileID.overscaledZ),q,this.tileID.canonical))return}else if(!p.filter(new or(this.tileID.overscaledZ),N))return;const B=this.getId(N,I);for(const q of D){if(g&&!g.has(q))continue;const W=S[q];if(!W)continue;let ee={};B&&P&&(ee=P.getState(W.sourceLayer||Gf,B));const X=zt({},w[q]);X.paint=aP(X.paint,W.paint,N,ee,y),X.layout=aP(X.layout,W.layout,N,ee,y);const te=!T||T(N,W,ee);if(!te)continue;const le=new ME(N,this.z,this.x,this.y,B);le.layer=X;let he=t[q];he===void 0&&(he=t[q]=[]),he.push({featureIndex:d,feature:le,intersectionZ:te})}}lookupSymbolFeatures(t,i,l,d,p,g,y,S){const w={};this.loadVTLayers();const P=Dc(p.filterSpec,p.globalState);for(const T of t)this.loadMatchingFeature(w,l,d,T,P,g,y,S,i);return w}hasLayer(t){for(const i of this.bucketLayerIDs)for(const l of i)if(t===l)return!0;return!1}getId(t,i){var l;let d=t.id;return this.promoteId&&(d=t.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[i]],typeof d=="boolean"&&(d=Number(d)),d===void 0&&(!((l=t.properties)===null||l===void 0)&&l.cluster)&&this.promoteId&&(d=Number(t.properties.cluster_id))),d}}function aP(o,t,i,l,d){return Bi(o,(p,g)=>{const y=t instanceof qc?t.get(g):null;return y!=null&&y.evaluate?y.evaluate(i,l,d):y})}function BF(o,t){return t-o}function lP(o,t,i,l,d){const p=[];for(const g of o){let y;for(let S=0;S<g.length-1;S++){let w=g[S],P=g[S+1];w.x<t&&P.x<t||(w.x<t?w=new A(t,w.y+(t-w.x)/(P.x-w.x)*(P.y-w.y))._round():P.x<t&&(P=new A(t,w.y+(t-w.x)/(P.x-w.x)*(P.y-w.y))._round()),w.y<i&&P.y<i||(w.y<i?w=new A(w.x+(i-w.y)/(P.y-w.y)*(P.x-w.x),i)._round():P.y<i&&(P=new A(w.x+(i-w.y)/(P.y-w.y)*(P.x-w.x),i)._round()),w.x>=l&&P.x>=l||(w.x>=l?w=new A(l,w.y+(l-w.x)/(P.x-w.x)*(P.y-w.y))._round():P.x>=l&&(P=new A(l,w.y+(l-w.x)/(P.x-w.x)*(P.y-w.y))._round()),w.y>=d&&P.y>=d||(w.y>=d?w=new A(w.x+(d-w.y)/(P.y-w.y)*(P.x-w.x),d)._round():P.y>=d&&(P=new A(w.x+(d-w.y)/(P.y-w.y)*(P.x-w.x),d)._round()),y&&w.equals(y[y.length-1])||(y=[w],p.push(y)),y.push(P)))))}}return p}function cP(o,t,i,l,d){switch(t){case 1:return function(p,g,y,S){const w=[];for(const P of p)for(const T of P){const D=S===0?T.x:T.y;D>=g&&D<=y&&w.push([T])}return w}(o,i,l,d);case 2:return uP(o,i,l,d,!1);case 3:return uP(o,i,l,d,!0)}return[]}function VF(o,t,i,l,d){const p=l===0?UF:$F;let g=[];const y=[];for(let P=0;P<o.length-1;P++){const T=o[P],D=o[P+1],I=l===0?T.x:T.y,N=l===0?D.x:D.y;let B=!1;I<t?N>
vendor: 12,516 bytes, line 458
458t&&g.push(p(T,D,t)):I>i?N<i&&g.push(p(T,D,i)):g.push(T),N<t&&I>=t&&(g.push(p(T,D,t)),B=!0),N>i&&I<=i&&(g.push(p(T,D,i)),B=!0),!d&&B&&(y.push(g),g=[])}const S=o.length-1,w=l===0?o[S].x:o[S].y;return w>=t&&w<=i&&g.push(o[S]),d&&g.length>0&&!g[0].equals(g[g.length-1])&&g.push(new A(g[0].x,g[0].y)),g.length>0&&y.push(g),y}function uP(o,t,i,l,d){const p=[];for(const g of o){const y=VF(g,t,i,l,d);y.length>0&&p.push(...y)}return p}function UF(o,t,i){return new A(i,o.y+(i-o.x)/(t.x-o.x)*(t.y-o.y))}function $F(o,t,i){return new A(o.x+(i-o.y)/(t.y-o.y)*(t.x-o.x),i)}ct("FeatureIndex",sP,{omit:["rawTileData","sourceLayerCoder"]});class xl extends A{constructor(t,i,l,d){super(t,i),this.angle=l,d!==void 0&&(this.segment=d)}clone(){return new xl(this.x,this.y,this.angle,this.segment)}}function dP(o,t,i,l,d){if(t.segment===void 0||i===0)return!0;let p=t,g=t.segment+1,y=0;for(;y>-i/2;){if(g--,g<0)return!1;y-=o[g].dist(p),p=o[g]}y+=o[g].dist(o[g+1]),g++;const S=[];let w=0;for(;y<i/2;){const P=o[g],T=o[g+1];if(!T)return!1;let D=o[g-1].angleTo(P)-P.angleTo(T);for(D=Math.abs((D+3*Math.PI)%(2*Math.PI)-Math.PI),S.push({distance:y,angleDelta:D}),w+=D;y-S[0].distance>l;)w-=S.shift().angleDelta;if(w>d)return!1;g++,y+=P.dist(T)}return!0}function hP(o){let t=0;for(let i=0;i<o.length-1;i++)t+=o[i].dist(o[i+1]);return t}function pP(o,t,i){return o?.6*t*i:0}function fP(o,t){return Math.max(o?o.right-o.left:0,t?t.right-t.left:0)}function GF(o,t,i,l,d,p){const g=pP(i,d,p),y=fP(i,l)*p;let S=0;const w=hP(o)/2;for(let P=0;P<o.length-1;P++){const T=o[P],D=o[P+1],I=T.dist(D);if(S+I>w){const N=(w-S)/I,B=ai.number(T.x,D.x,N),q=ai.number(T.y,D.y,N),W=new xl(B,q,D.angleTo(T),P);return W._round(),!g||dP(o,W,y,g,t)?W:void 0}S+=I}}function qF(o,t,i,l,d,p,g,y,S){const w=pP(l,p,g),P=fP(l,d),T=P*g,D=o[0].x===0||o[0].x===S||o[0].y===0||o[0].y===S;return t-T<t/4&&(t=T+t/4),mP(o,D?t/2*y%t:(P/2+2*p)*g*y%t,t,w,i,T,D,!1,S)}function mP(o,t,i,l,d,p,g,y,S){const w=p/2,P=hP(o);let T=0,D=t-i,I=[];for(let N=0;N<o.length-1;N++){const B=o[N],q=o[N+1],W=B.dist(q),ee=q.angleTo(B);for(;D+i<T+W;){D+=i;const X=(D-T)/W,te=ai.number(B.x,q.x,X),le=ai.number(B.y,q.y,X);if(te>=0&&te<S&&le>=0&&le<S&&D-w>=0&&D+w<=P){const he=new xl(te,le,ee,N);he._round(),l&&!dP(o,he,p,l,d)||I.push(he)}}T+=W}return y||I.length||g||(I=mP(o,T/2,i,l,d,p,g,!0,S)),I}function gP(o,t,i,l){const d=[],p=o.image,g=p.pixelRatio,y=p.paddedRect.w-2,S=p.paddedRect.h-2;let w={x1:o.left,y1:o.top,x2:o.right,y2:o.bottom};const P=p.stretchX||[[0,y]],T=p.stretchY||[[0,S]],D=(Le,Ye)=>Le+Ye[1]-Ye[0],I=P.reduce(D,0),N=T.reduce(D,0),B=y-I,q=S-N;let W=0,ee=I,X=0,te=N,le=0,he=B,Se=0,Ee=q;if(p.content&&l){const Le=p.content,Ye=Le[2]-Le[0],st=Le[3]-Le[1];(p.textFitWidth||p.textFitHeight)&&(w=hE(o)),W=Hy(P,0,Le[0]),X=Hy(T,0,Le[1]),ee=Hy(P,Le[0],Le[2]),te=Hy(T,Le[1],Le[3]),le=Le[0]-W,Se=Le[1]-X,he=Ye-ee,Ee=st-te}const Oe=w.x1,ke=w.y1,Be=w.x2-Oe,Ve=w.y2-ke,Fe=(Le,Ye,st,tt)=>{const Qe=Xy(Le.stretch-W,ee,Be,Oe),wt=Ky(Le.fixed-le,he,Le.stretch,I),Vt=Xy(Ye.stretch-X,te,Ve,ke),qt=Ky(Ye.fixed-Se,Ee,Ye.stretch,N),er=Xy(st.stretch-W,ee,Be,Oe),In=Ky(st.fixed-le,he,st.stretch,I),Tr=Xy(tt.stretch-X,te,Ve,ke),Hr=Ky(tt.fixed-Se,Ee,tt.stretch,N),tn=new A(Qe,Vt),pr=new A(er,Vt),fn=new A(er,Tr),Vn=new A(Qe,Tr),Un=new A(wt/g,qt/g),hi=new A(In/g,Hr/g),Mn=t*Math.PI/180;if(Mn){const rn=Math.sin(Mn),xr=Math.cos(Mn),Ur=[xr,-rn,rn,xr];tn._matMult(Ur),pr._matMult(Ur),Vn._matMult(Ur),fn._matMult(Ur)}const pi=Le.stretch+Le.fixed,go=Ye.stretch+Ye.fixed;return{tl:tn,tr:pr,bl:Vn,br:fn,tex:{x:p.paddedRect.x+1+pi,y:p.paddedRect.y+1+go,w:st.stretch+st.fixed-pi,h:tt.stretch+tt.fixed-go},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Un,pixelOffsetBR:hi,minFontScaleX:he/g/Be,minFontScaleY:Ee/g/Ve,isSDF:i}};if(l&&(p.stretchX||p.stretchY)){const Le=yP(P,B,I),Ye=yP(T,q,N);for(let st=0;st<Le.length-1;st++){const tt=Le[st],Qe=Le[st+1];for(let wt=0;wt<Ye.length-1;wt++)d.push(Fe(tt,Ye[wt],Qe,Ye[wt+1]))}}else d.push(Fe({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:y+1},{fixed:0,stretch:S+1}));return d}function Hy(o,t,i){let l=0;for(const d of o)l+=Math.max(t,Math.min(i,d[1]))-Math.max(t,Math.min(i,d[0]));return l}function yP(o,t,i){const l=[{fixed:-1,stretch:0}];for(const[d,p]of o){const g=l[l.length-1];l.push({fixed:d-g.stretch,stretch:g.stretch}),l.push({fixed:d-g.stretch,stretch:g.stretch+(p-d)})}return l.push({fixed:t+1,stretch:i}),l}function Xy(o,t,i,l){return o/t*i+l}function Ky(o,t,i,l){return o-t*i/l}ct("Anchor",xl);class Yy{constructor(t,i,l,d,p,g,y,S,w,P){var T;if(this.boxStartIndex=t.length,w){let D=g.top,I=g.bottom;const N=g.collisionPadding;N&&(D-=N[1],I+=N[3]);let B=I-D;B>0&&(B=Math.max(10,B),this.circleDiameter=B)}else{const D=!((T=g.image)===null||T===void 0)&&T.content&&(g.image.textFitWidth||g.image.textFitHeight)?hE(g):{x1:g.left,y1:g.top,x2:g.right,y2:g.bottom};D.y1=D.y1*y-S[0],D.y2=D.y2*y+S[2],D.x1=D.x1*y-S[3],D.x2=D.x2*y+S[1];const I=g.collisionPadding;if(I&&(D.x1-=I[0]*y,D.y1-=I[1]*y,D.x2+=I[2]*y,D.y2+=I[3]*y),P){const N=new A(D.x1,D.y1),B=new A(D.x2,D.y1),q=new A(D.x1,D.y2),W=new A(D.x2,D.y2),ee=P*Math.PI/180;N._rotate(ee),B._rotate(ee),q._rotate(ee),W._rotate(ee),D.x1=Math.min(N.x,B.x,q.x,W.x),D.x2=Math.max(N.x,B.x,q.x,W.x),D.y1=Math.min(N.y,B.y,q.y,W.y),D.y2=Math.max(N.y,B.y,q.y,W.y)}t.emplaceBack(i.x,i.y,D.x1,D.y1,D.x2,D.y2,l,d,p)}this.boxEndIndex=t.length}}class WF{constructor(t=[],i=(l,d)=>l<d?-1:l>d?1:0){if(this.data=t,this.length=this.data.length,this.compare=i,this.length>0)for(let l=(this.length>>1)-1;l>=0;l--)this._down(l)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],i=this.data.pop();return--this.length>0&&(this.data[0]=i,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:i,compare:l}=this,d=i[t];for(;t>0;){const p=t-1>>1,g=i[p];if(l(d,g)>=0)break;i[t]=g,t=p}i[t]=d}_down(t){const{data:i,compare:l}=this,d=this.length>>1,p=i[t];for(;t<d;){let g=1+(t<<1);const y=g+1;if(y<this.length&&l(i[y],i[g])<0&&(g=y),l(i[g],p)>=0)break;i[t]=i[g],t=g}i[t]=p}}function ZF(o,t=1){const i=eu.fromPoints(o[0]),l=Math.min(i.width(),i.height());let d=l/2;const p=new WF([],HF),{minX:g,minY:y,maxX:S,maxY:w}=i;if(l===0)return new A(g,y);for(let D=g;D<S;D+=l)for(let I=y;I<w;I+=l)p.push(new rh(D+d,I+d,d,o));const P=function(D){let I=0,N=0,B=0;const q=D[0];for(let W=0,ee=q.length,X=ee-1;W<ee;X=W++){const te=q[W],le=q[X],he=te.x*le.y-le.x*te.y;N+=(te.x+le.x)*he,B+=(te.y+le.y)*he,I+=3*he}return new rh(N/I,B/I,0,D)}(o);let T=P;for(;p.length;){const D=p.pop();(D.d>T.d||!T.d)&&(T=D),D.max-T.d<=t||(d=D.h/2,p.push(new rh(D.p.x-d,D.p.y-d,d,o)),p.push(new rh(D.p.x+d,D.p.y-d,d,o)),p.push(new rh(D.p.x-d,D.p.y+d,d,o)),p.push(new rh(D.p.x+d,D.p.y+d,d,o)))}return P.d>0&&T.d-P.d<=t?P.p:T.p}function HF(o,t){return t.max-o.max}class rh{constructor(t,i,l,d){this.p=new A(t,i),this.h=l,this.d=function(p,g){let y=!1,S=1/0;for(const w of g)for(let P=0,T=w.length,D=T-1;P<T;D=P++){const I=w[P],N=w[D];I.y>p.y!=N.y>p.y&&p.x<(N.x-I.x)*(p.y-I.y)/(N.y-I.y)+I.x&&(y=!y),S=Math.min(S,lT(p,I,N))}return(y?1:-1)*Math.sqrt(S)}(this.p,d),this.max=this.d+this.h*Math.SQRT2}}var Cn;v.aM=void 0,(Cn=v.aM||(v.aM={}))[Cn.center=1]="center",Cn[Cn.left=2]="left",Cn[Cn.right=3]="right",Cn[Cn.top=4]="top",Cn[Cn.bottom=5]="bottom",Cn[Cn["top-left"]=6]="top-left",Cn[Cn["top-right"]=7]="top-right",Cn[Cn["bottom-left"]=8]="bottom-left",Cn[Cn["bottom-right"]=9]="bottom-right";const hb=Number.POSITIVE_INFINITY;function _P(o,t){return t[1]!==hb?function(i,l,d){let p=0,g=0;switch(l=Math.abs(l),d=Math.abs(d),i){case"top-right":case"top-left":case"top":g=d-7;break;case"bottom-right":case"bottom-left":case"bottom":g=7-d}switch(i){case"top-right":case"bottom-right":case"right":p=-l;break;case"top-left":case"bottom-left":case"left":p=l}return[p,g]}(o,t[0],t[1]):function(i,l){let d=0,p=0;l<0&&(l=0);const g=l/Math.SQRT2;switch(i){case"top-right":case"top-left":p=g-7;break;case"bottom-right":case"bottom-left":p=7-g;break;case"bottom":p=7-l;break;case"top":p=l-7}switch(i){case"top-right":case"bottom-right":d=-g;break;case"top-left":case"bottom-left":d=g;break;case"left":d=l;break;case"right":d=-l}return[d,p]}(o,t[0])}function vP(o,t,i){var l;const d=o.layout,p=(l=d.get("text-variable-anchor-offset"))===null||l===void 0?void 0:l.evaluate(t,{},i);if(p){const y=p.values,S=[];for(let w=0;w<y.length;w+=2){const P=S[w]=y[w],T=y[w+1].map(D=>D*Jr);P.startsWith("top")?T[1]-=7:P.startsWith("bottom")&&(T[1]+=7),S[w+1]=T}return new zn(S)}const g=d.get("text-variable-anchor");if(g){let y;y=o._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[d.get("text-radial-offset").evaluate(t,{},i)*Jr,hb]:d.get("text-offset").evaluate(t,{},i).map(w=>w*Jr);const S=[];for(const w of g)S.push(w,_P(w,y));return new zn(S)}return null}function pb(o){switch(o){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function XF(o,t,i,l,d,p,g,y,S,w,P,T){let D=p.textMaxSize.evaluate(t,{});D===void 0&&(D=g);const I=o.layers[0].layout,N=I.get("icon-offset").evaluate(t,{},P),B=bP(i.horizontal),q=g/24,W=o.tilePixelRatio*q,ee=o.tilePixelRatio*D/24,X=o.tilePixelRatio*y,te=o.tilePixelRatio*I.get("symbol-spacing"),le=I.get("text-padding")*o.tilePixelRatio,he=function(st,tt,Qe,wt=1){const Vt=st.get("icon-padding").evaluate(tt,{},Qe),qt=Vt==null?void 0:Vt.values;return[qt[0]*wt,qt[1]*wt,qt[2]*wt,qt[3]*wt]}(I,t,P,o.tilePixelRatio),Se=I.get("text-max-angle")/180*Math.PI,Ee=I.get("text-rotation-alignment")!=="viewport"&&I.get("symbol-placement")!=="point",Oe=I.get("icon-rotation-alignment")==="map"&&I.get("symbol-placement")!=="point",ke=I.get("symbol-placement"),Be=te/2,Ve=I.get("icon-text-fit");let Fe;l&&Ve!=="none"&&(o.allowVerticalPlacement&&i.vertical&&(Fe=pE(l,i.vertical,Ve,I.get("icon-text-fit-padding"),N,q)),B&&(l=pE(l,B,Ve,I.get("icon-text-fit-padding"),N,q)));const Le=P?T.line.getGranularityForZoomLevel(P.z):1,Ye=(st,tt)=>{tt.x<0||tt.x>=Pe||tt.y<0||tt.y>=Pe||function(Qe,wt,Vt,qt,er,In,Tr,Hr,tn,pr,fn,Vn,Un,hi,Mn,pi,go,rn,xr,Ur,Er,nn,ha,Vo,qf){const bl=Qe.addToLineVertexArray(wt,Vt);let ru,nh,ih,oh,wP=0,SP=0,TP=0,EP=0,fb=-1,mb=-1;const pa={};let PP=Qr("");if(Qe.allowVerticalPlacement&&qt.vertical){const $n=Hr.layout.get("text-rotate").evaluate(Er,{},Vo)+90;ih=new Yy(tn,wt,pr,fn,Vn,qt.vertical,Un,hi,Mn,$n),Tr&&(oh=new Yy(tn,wt,pr,fn,Vn,Tr,go,rn,Mn,$n))}if(er){const $n=Hr.layout.get("icon-rotate").evaluate(Er,{}),Hi=Hr.layout.get("icon-text-fit")!=="none",nu=gP(er,$n,ha,Hi),$o=Tr?gP(Tr,$n,ha,Hi):void 0;nh=new Yy(tn,wt,pr,fn,Vn,er,go,rn,!1,$n),wP=4*nu.length;const iu=Qe.iconSizeData;let xs=null;iu.kind==="source"?(xs=[ua*Hr.layout.get("icon-size").evaluate(Er,{})],xs[0]>ml&&Nr(`${Qe.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):iu.kind==="composite"&&(xs=[ua*nn.compositeIconSizes[0].evaluate(Er,{},Vo),ua*nn.compositeIconSizes[1].evaluate(Er,{},Vo)],(xs[0]>ml||xs[1]>ml)&&Nr(`${Qe.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Qe.addSymbols(Qe.icon,nu,xs,Ur,xr,Er,v.ax.none,wt,bl.lineStartIndex,bl.lineLength,-1,Vo),fb=Qe.icon.placedSymbolArray.length-1,$o&&(SP=4*$o.length,Qe.addSymbols(Qe.icon,$o,xs,Ur,xr,Er,v.ax.vertical,wt,bl.lineStartIndex,bl.lineLength,-1,Vo),mb=Qe.icon.placedSymbolArray.length-1)}const CP=Object.keys(qt.horizontal);for(const $n of CP){const Hi=qt.horizontal[$n];if(!ru){PP=Qr(Hi.text);const $o=Hr.layout.get("text-rotate").evaluate(Er,{},Vo);ru=new Yy(tn,wt,pr,fn,Vn,Hi,Un,hi,Mn,$o)}const nu=Hi.positionedLines.length===1;if(TP+=xP(Qe,wt,Hi,In,Hr,Mn,Er,pi,bl,qt.vertical?v.ax.horizontal:v.ax.horizontalOnly,nu?CP:[$n],pa,fb,nn,Vo),nu)break}qt.vertical&&(EP+=xP(Qe,wt,qt.vertical,In,Hr,Mn,Er,pi,bl,v.ax.vertical,["vertical"],pa,mb,nn,Vo));const YF=ru?ru.boxStartIndex:Qe.collisionBoxArray.length,QF=ru?ru.boxEndIndex:Qe.collisionBoxArray.length,JF=ih?ih.boxStartIndex:Qe.collisionBoxArray.length,e4=ih?ih.boxEndIndex:Qe.collisionBoxArray.length,t4=nh?nh.boxStartIndex:Qe.collisionBoxArray.length,r4=nh?nh.boxEndIndex:Qe.collisionBoxArray.length,n4=oh?oh.boxStartIndex:Qe.collisionBoxArray.length,i4=oh?oh.boxEndIndex:Qe.collisionBoxArray.length;let Uo=-1;const Qy=($n,Hi)=>$n!=null&&$n.circleDiameter?Math.max($n.circleDiameter,Hi):Hi;Uo=Qy(ru,Uo),Uo=Qy(ih,Uo),Uo=Qy(nh,Uo),Uo=Qy(oh,Uo);const IP=Uo>-1?1:0;IP&&(Uo*=qf/Jr),Qe.glyphOffsetArray.length>=Wd.MAX_GLYPHS&&Nr("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Er.sortKey!==void 0&&Qe.addToSortKey
458Ranges(Qe.symbolInstances.length,Er.sortKey);const o4=vP(Hr,Er,Vo),[s4,a4]=function($n,Hi){const nu=$n.length,$o=Hi==null?void 0:Hi.values;if(($o==null?void 0:$o.length)>0)for(let iu=0;iu<$o.length;iu+=2){const xs=$o[iu+1];$n.emplaceBack(v.aM[$o[iu]],xs[0],xs[1])}return[nu,$n.length]}(Qe.textAnchorOffsets,o4);Qe.symbolInstances.emplaceBack(wt.x,wt.y,pa.right>=0?pa.right:-1,pa.center>=0?pa.center:-1,pa.left>=0?pa.left:-1,pa.vertical||-1,fb,mb,PP,YF,QF,JF,e4,t4,r4,n4,i4,pr,TP,EP,wP,SP,IP,0,Un,Uo,s4,a4)}(o,tt,st,i,l,d,Fe,o.layers[0],o.collisionBoxArray,t.index,t.sourceLayerIndex,o.index,W,[le,le,le,le],Ee,S,X,he,Oe,N,t,p,w,P,g)};if(ke==="line")for(const st of lP(t.geometry,0,0,Pe,Pe)){const tt=Jc(st,Le),Qe=qF(tt,te,Se,i.vertical||B,l,24,ee,o.overscaling,Pe);for(const wt of Qe)B&&KF(o,B.text,Be,wt)||Ye(tt,wt)}else if(ke==="line-center"){for(const st of t.geometry)if(st.length>1){const tt=Jc(st,Le),Qe=GF(tt,Se,i.vertical||B,l,24,ee);Qe&&Ye(tt,Qe)}}else if(t.type==="Polygon")for(const st of od(t.geometry,0)){const tt=ZF(st,16);Ye(Jc(st[0],Le,!0),new xl(tt.x,tt.y,0))}else if(t.type==="LineString")for(const st of t.geometry){const tt=Jc(st,Le);Ye(tt,new xl(tt[0].x,tt[0].y,0))}else if(t.type==="Point")for(const st of t.geometry)for(const tt of st)Ye([tt],new xl(tt.x,tt.y,0))}function xP(o,t,i,l,d,p,g,y,S,w,P,T,D,I,N){const B=function(ee,X,te,le,he,Se,Ee,Oe){const ke=le.layout.get("text-rotate").evaluate(Se,{})*Math.PI/180,Be=[];for(const Ve of X.positionedLines)for(const Fe of Ve.positionedGlyphs){if(!Fe.rect)continue;const Le=Fe.rect||{};let Ye=4,st=!0,tt=1,Qe=0;const wt=(he||Oe)&&Fe.vertical,Vt=Fe.metrics.advance*Fe.scale/2;if(Oe&&X.verticalizable&&(Qe=Ve.lineOffset/2-(Fe.imageName?-(Jr-Fe.metrics.width*Fe.scale)/2:(Fe.scale-1)*Jr)),Fe.imageName){const rn=Ee[Fe.imageName];st=rn.sdf,tt=rn.pixelRatio,Ye=1/tt}const qt=he?[Fe.x+Vt,Fe.y]:[0,0];let er=he?[0,0]:[Fe.x+Vt+te[0],Fe.y+te[1]-Qe],In=[0,0];wt&&(In=er,er=[0,0]);const Tr=Fe.metrics.isDoubleResolution?2:1,Hr=(Fe.metrics.left-Ye)*Fe.scale-Vt+er[0],tn=(-Fe.metrics.top-Ye)*Fe.scale+er[1],pr=Hr+Le.w/Tr*Fe.scale/tt,fn=tn+Le.h/Tr*Fe.scale/tt,Vn=new A(Hr,tn),Un=new A(pr,tn),hi=new A(Hr,fn),Mn=new A(pr,fn);if(wt){const rn=new A(-Vt,Vt- -17),xr=-Math.PI/2,Ur=12-Vt,Er=new A(22-Ur,-(Fe.imageName?Ur:0)),nn=new A(...In);Vn._rotateAround(xr,rn)._add(Er)._add(nn),Un._rotateAround(xr,rn)._add(Er)._add(nn),hi._rotateAround(xr,rn)._add(Er)._add(nn),Mn._rotateAround(xr,rn)._add(Er)._add(nn)}if(ke){const rn=Math.sin(ke),xr=Math.cos(ke),Ur=[xr,-rn,rn,xr];Vn._matMult(Ur),Un._matMult(Ur),hi._matMult(Ur),Mn._matMult(Ur)}const pi=new A(0,0),go=new A(0,0);Be.push({tl:Vn,tr:Un,bl:hi,br:Mn,tex:Le,writingMode:X.writingMode,glyphOffset:qt,sectionIndex:Fe.sectionIndex,isSDF:st,pixelOffsetTL:pi,pixelOffsetBR:go,minFontScaleX:0,minFontScaleY:0})}return Be}(0,i,y,d,p,g,l,o.allowVerticalPlacement),q=o.textSizeData;let W=null;q.kind==="source"?(W=[ua*d.layout.get("text-size").evaluate(g,{})],W[0]>ml&&Nr(`${o.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):q.kind==="composite"&&(W=[ua*I.compositeTextSizes[0].evaluate(g,{},N),ua*I.compositeTextSizes[1].evaluate(g,{},N)],(W[0]>ml||W[1]>ml)&&Nr(`${o.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),o.addSymbols(o.text,B,W,y,p,g,w,t,S.lineStartIndex,S.lineLength,D,N);for(const ee of P)T[ee]=o.text.placedSymbolArray.length-1;return 4*B.length}function bP(o){for(const t in o)return o[t];return null}function KF(o,t,i,l){const d=o.compareText;if(t in d){const p=d[t];for(let g=p.length-1;g>=0;g--)if(l.dist(p[g])<i)return!0}else d[t]=[];return d[t].push(l),!1}v.$=Sg,v.A=J,v.B=Sd,v.C=my,v.D=ft,v.E=$u,v.F=ho,v.G=function([o,t,i]){return t+=90,t*=Math.PI/180,i*=Math.PI/180,{x:o*Math.cos(t)*Math.sin(i),y:o*Math.sin(t)*Math.sin(i),z:o*Math.cos(i)}},v.H=ai,v.I=jx,v.J=or,v.K=Vc,v.L=function(o){if(bn==null){const t=o.navigator?o.navigator.userAgent:null;bn=!!o.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return bn},v.M=wi,v.N=class{constructor(o,t){this.target=o,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new aF(()=>this.process()),this.subscription=Bu(this.target,"message",i=>this.receive(i),!1),this.globalScope=Wr(self)?o:window}registerMessageHandler(o,t){this.messageHandlers[o]=t}unregisterMessageHandler(o){delete this.messageHandlers[o]}sendAsync(o,t){return new Promise((i,l)=>{const d=Math.round(1e18*Math.random()).toString(36).substring(0,10),p=t?Bu(t.signal,"abort",()=>{p==null||p.unsubscribe(),delete this.resolveRejects[d];const S={id:d,type:"<cancel>",origin:location.origin,targetMapId:o.targetMapId,sourceMapId:this.mapId};this.target.postMessage(S)},lF):null;this.resolveRejects[d]={resolve:S=>{p==null||p.unsubscribe(),i(S)},reject:S=>{p==null||p.unsubscribe(),l(S)}};const g=[],y=Object.assign(Object.assign({},o),{id:d,sourceMapId:this.mapId,origin:location.origin,data:Lo(o.data,g)});this.target.postMessage(y,{transfer:g})})}receive(o){const t=o.data,i=t.id,l=["file://","resource://android","null"],d=[t.origin,location.origin],p=t.origin===location.origin,g=d.some(y=>l.includes(y));if((p||g)&&(!t.targetMapId||this.mapId===t.targetMapId)){if(t.type==="<cancel>"){delete this.tasks[i];const y=this.abortControllers[i];return delete this.abortControllers[i],void(y&&y.abort())}if(Wr(self)||t.mustQueue)return this.tasks[i]=t,this.taskQueue.push(i),void this.invoker.trigger();this.processTask(i,t)}}process(){if(this.taskQueue.length===0)return;const o=this.taskQueue.shift(),t=this.tasks[o];delete this.tasks[o],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(o,t)}processTask(o,t){return c(this,void 0,void 0,function*(){if(t.type==="<response>"){const d=this.resolveRejects[o];return delete this.resolveRejects[o],d?void(t.error?d.reject(ot($c(t.error))):d.resolve($c(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(o,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const i=$c(t.data),l=new AbortController;this.abortControllers[o]=l;try{const d=yield this.messageHandlers[t.type](t.sourceMapId,i,l);this.completeTask(o,null,d)}catch(d){this.completeTask(o,ot(d))}})}completeTask(o,t,i){const l=[];delete this.abortControllers[o];const d={id:o,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?Lo(t):null,data:Lo(i,l)};this.target.postMessage(d,{transfer:l})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},v.O=function(){var o=new J(16);return J!=Float32Array&&(o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[11]=0,o[12]=0,o[13]=0,o[14]=0),o[0]=1,o[5]=1,o[10]=1,o[15]=1,o},v.P=A,v.Q=function(o,t,i){var l,d,p,g,y,S,w,P,T,D,I,N,B=i[0],q=i[1],W=i[2];return t===o?(o[12]=t[0]*B+t[4]*q+t[8]*W+t[12],o[13]=t[1]*B+t[5]*q+t[9]*W+t[13],o[14]=t[2]*B+t[6]*q+t[10]*W+t[14],o[15]=t[3]*B+t[7]*q+t[11]*W+t[15]):(d=t[1],p=t[2],g=t[3],y=t[4],S=t[5],w=t[6],P=t[7],T=t[8],D=t[9],I=t[10],N=t[11],o[0]=l=t[0],o[1]=d,o[2]=p,o[3]=g,o[4]=y,o[5]=S,o[6]=w,o[7]=P,o[8]=T,o[9]=D,o[10]=I,o[11]=N,o[12]=l*B+y*q+T*W+t[12],o[13]=d*B+S*q+D*W+t[13],o[14]=p*B+w*q+I*W+t[14],o[15]=g*B+P*q+N*W+t[15]),o},v.R=di,v.S=function(o,t,i){var l=i[0],d=i[1],p=i[2];return o[0]=t[0]*l,o[1]=t[1]*l,o[2]=t[2]*l,o[3]=t[3]*l,o[4]=t[4]*d,o[5]=t[5]*d,o[6]=t[6]*d,o[7]=t[7]*d,o[8]=t[8]*p,o[9]=t[9]*p,o[10]=t[10]*p,o[11]=t[11]*p,o[12]=t[12],o[13]=t[13],o[14]=t[14],o[15]=t[15],o},v.T=fx,v.U=function(o,t,i){var l=t[0],d=t[1],p=t[2],g=t[3],y=t[4],S=t[5],w=t[6],P=t[7],T=t[8],D=t[9],I=t[10],N=t[11],B=t[12],q=t[13],W=t[14],ee=t[15],X=i[0],te=i[1],le=i[2],he=i[3];
vendor: 20,630 bytes, line 458
458return o[0]=X*l+te*y+le*T+he*B,o[1]=X*d+te*S+le*D+he*q,o[2]=X*p+te*w+le*I+he*W,o[3]=X*g+te*P+le*N+he*ee,o[4]=(X=i[4])*l+(te=i[5])*y+(le=i[6])*T+(he=i[7])*B,o[5]=X*d+te*S+le*D+he*q,o[6]=X*p+te*w+le*I+he*W,o[7]=X*g+te*P+le*N+he*ee,o[8]=(X=i[8])*l+(te=i[9])*y+(le=i[10])*T+(he=i[11])*B,o[9]=X*d+te*S+le*D+he*q,o[10]=X*p+te*w+le*I+he*W,o[11]=X*g+te*P+le*N+he*ee,o[12]=(X=i[12])*l+(te=i[13])*y+(le=i[14])*T+(he=i[15])*B,o[13]=X*d+te*S+le*D+he*q,o[14]=X*p+te*w+le*I+he*W,o[15]=X*g+te*P+le*N+he*ee,o},v.V=function(o,t){const i={};for(const l of t)l in o&&(i[l]=o[l]);return i},v.W=gl,v.X=cr,v.Y=wE,v.Z=bE,v._=c,v.a=fc,v.a$=function(o){var t=new J(3);return t[0]=o[0],t[1]=o[1],t[2]=o[2],t},v.a0=ie,v.a1=Q,v.a2=bp,v.a3=Ci,v.a4=TE,v.a5=qy,v.a6=Pe,v.a7=Vf,v.a8=eu,v.a9=25,v.aA=function(o){var t=o[0],i=o[1];return Math.sqrt(t*t+i*i)},v.aB=function(o){return o[0]=0,o[1]=0,o},v.aC=function(o,t,i){return o[0]=t[0]*i,o[1]=t[1]*i,o},v.aD=Vx,v.aE=$e,v.aF=function(o,t,i,l){const d=t.y-o.y,p=t.x-o.x,g=l.y-i.y,y=l.x-i.x,S=g*p-y*d;if(S===0)return null;const w=(y*(o.y-i.y)-g*(o.x-i.x))/S;return new A(o.x+w*p,o.y+w*d)},v.aG=lP,v.aH=zd,v.aI=function(o){let t=1/0,i=1/0,l=-1/0,d=-1/0;for(const p of o)t=Math.min(t,p.x),i=Math.min(i,p.y),l=Math.max(l,p.x),d=Math.max(d,p.y);return[t,i,l,d]},v.aJ=Jr,v.aK=Ke,v.aL=function(o,t,i,l,d=!1){if(!i[0]&&!i[1])return[0,0];const p=d?l==="map"?-o.bearingInRadians:0:l==="viewport"?o.bearingInRadians:0;if(p){const g=Math.sin(p),y=Math.cos(p);i=[i[0]*y-i[1]*g,i[0]*g+i[1]*y]}return[d?i[0]:Ke(t,i[0],o.zoom),d?i[1]:Ke(t,i[1],o.zoom)]},v.aN=Bx,v.aO=pb,v.aP=Nx,v.aQ=o=>o.type==="symbol",v.aR=zy,v.aS=ar,v.aT=Ly,v.aU=de,v.aV=lt,v.aW=He,v.aX=js,v.aY=EE,v.aZ=se,v.a_=re,v.aa=Wx,v.ab=o=>{const t=window.document.createElement("video");return t.muted=!0,new Promise(i=>{t.onloadstart=()=>{i(t)};for(const l of o){const d=window.document.createElement("source");Vi(l)||(t.crossOrigin="Anonymous"),d.src=l,t.appendChild(d)}})},v.ac=et,v.ad=function(){return xn++},v.ae=f,v.af=Wd,v.ag=Gf,v.ah=Dc,v.ai=vs,v.aj=ME,v.ak=function(o){const t={};if(o.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,l,d,p)=>{const g=d||p;return t[l]=!g||g.toLowerCase(),""}),t["max-age"]){const i=parseInt(t["max-age"],10);isNaN(i)?delete t["max-age"]:t["max-age"]=i}return t},v.al=Tt,v.am=85.051129,v.an=is,v.ao=function(o){return Math.pow(2,o)},v.ap=ce,v.aq=SE,v.ar=function(o){return Math.log(o)/Math.LN2},v.as=function(o){var t=o[0],i=o[1];return t*t+i*i},v.at=function(o){if(!o.length)return new Set;const t=Math.max(...o.map(S=>S.canonical.z));let i=1/0,l=-1/0,d=1/0,p=-1/0;const g=[];for(const S of o){const{x:w,y:P,z:T}=S.canonical,D=Math.pow(2,t-T),I=w*D,N=P*D;g.push({id:S,x:I,y:N}),I<i&&(i=I),I>l&&(l=I),N<d&&(d=N),N>p&&(p=N)}const y=new Set;for(const S of g)S.x!==i&&S.x!==l&&S.y!==d&&S.y!==p||y.add(S.id);return y},v.au=function(o,t){const i=Math.abs(2*o.wrap)-+(o.wrap<0),l=Math.abs(2*t.wrap)-+(t.wrap<0);return o.overscaledZ-t.overscaledZ||l-i||t.canonical.y-o.canonical.y||t.canonical.x-o.canonical.x},v.av=class{constructor(o,t){this.max=o,this.onRemove=t,this.reset()}reset(){for(const o in this.data)for(const t of this.data[o])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(o,t,i){const l=o.wrapped().key;this.data[l]===void 0&&(this.data[l]=[]);const d={value:t,timeout:void 0};if(i!==void 0&&(d.timeout=setTimeout(()=>{this.remove(o,d)},i)),this.data[l].push(d),this.order.push(l),this.order.length>this.max){const p=this._getAndRemoveByKey(this.order[0]);p&&this.onRemove(p)}return this}has(o){return o.wrapped().key in this.data}getAndRemove(o){return this.has(o)?this._getAndRemoveByKey(o.wrapped().key):null}_getAndRemoveByKey(o){const t=this.data[o].shift();return t.timeout&&clearTimeout(t.timeout),this.data[o].length===0&&delete this.data[o],this.order.splice(this.order.indexOf(o),1),t.value}getByKey(o){const t=this.data[o];return t?t[0].value:null}get(o){return this.has(o)?this.data[o.wrapped().key][0].value:null}remove(o,t){if(!this.has(o))return this;const i=o.wrapped().key,l=t===void 0?0:this.data[i].indexOf(t),d=this.data[i][l];return this.data[i].splice(l,1),d.timeout&&clearTimeout(d.timeout),this.data[i].length===0&&delete this.data[i],this.onRemove(d.value),this.order.splice(this.order.indexOf(i),1),this}setMaxSize(o){for(this.max=o;this.order.length>this.max;){const t=this._getAndRemoveByKey(this.order[0]);t&&this.onRemove(t)}return this}filter(o){const t=[];for(const i in this.data)for(const l of this.data[i])o(l.value)||t.push(l);for(const i of t)this.remove(i.value.tileID,i)}},v.aw=function(o,t){let i=0,l=0;if(o.kind==="constant")l=o.layoutSize;else if(o.kind!=="source"){const{interpolationType:d,minZoom:p,maxZoom:g}=o,y=d?Tt(Dr.interpolationFactor(d,t,p,g),0,1):0;o.kind==="camera"?l=ai.number(o.minSize,o.maxSize,y):i=y}return{uSizeT:i,uSize:l}},v.ay=function(o,{uSize:t,uSizeT:i},{lowerSize:l,upperSize:d}){return o.kind==="source"?l/ua:o.kind==="composite"?ai.number(l/ua,d/ua,i):t},v.az=We,v.b=Io,v.b$=kd,v.b0=function(o,t,i){return o[0]=t[0]-i[0],o[1]=t[1]-i[1],o[2]=t[2]-i[2],o},v.b1=function(o,t){var i=t[0],l=t[1],d=t[2],p=i*i+l*l+d*d;return p>0&&(p=1/Math.sqrt(p)),o[0]=t[0]*p,o[1]=t[1]*p,o[2]=t[2]*p,o},v.b2=ve,v.b3=function(o,t){return o[0]*t[0]+o[1]*t[1]+o[2]*t[2]},v.b4=function(o,t,i){return o[0]=t[0]*i[0],o[1]=t[1]*i[1],o[2]=t[2]*i[2],o[3]=t[3]*i[3],o},v.b5=Re,v.b6=function(o,t,i){const l=t[0]*i[0]+t[1]*i[1]+t[2]*i[2];return l===0?null:(-(o[0]*i[0]+o[1]*i[1]+o[2]*i[2])-i[3])/l},v.b7=qe,v.b8=function(o,t,i){return o[0]=t[0]*i,o[1]=t[1]*i,o[2]=t[2]*i,o[3]=t[3]*i,o},v.b9=function(o,t){return o[0]*t[0]+o[1]*t[1]+o[2]*t[2]+o[3]},v.bA=Ze,v.bB=function(o,t,i){var l=i[0],d=i[1],p=i[2],g=i[3],y=t[0],S=t[1],w=t[2],P=d*w-p*S,T=p*y-l*w,D=l*S-d*y;return o[0]=y+g*(P+=P)+d*(D+=D)-p*(T+=T),o[1]=S+g*T+p*P-l*D,o[2]=w+g*D+l*T-d*P,o},v.bC=function(o,t,i){const l=(d=[o[0],o[1],o[2],t[0],t[1],t[2],i[0],i[1],i[2]])[0]*((P=d[8])*(g=d[4])-(y=d[5])*(w=d[7]))+d[1]*(-P*(p=d[3])+y*(S=d[6]))+d[2]*(w*p-g*S);var d,p,g,y,S,w,P;if(l===0)return null;const T=ve([],[t[0],t[1],t[2]],[i[0],i[1],i[2]]),D=ve([],[i[0],i[1],i[2]],[o[0],o[1],o[2]]),I=ve([],[o[0],o[1],o[2]],[t[0],t[1],t[2]]),N=se([],T,-o[3]);return re(N,N,se([],D,-t[3])),re(N,N,se([],I,-i[3])),se(N,N,1/l),N},v.bD=qx,v.bE=function(){return new Float64Array(4)},v.bF=function(o,t,i,l){var d=[],p=[];return d[0]=t[0]-i[0],d[1]=t[1]-i[1],d[2]=t[2]-i[2],p[0]=d[0]*Math.cos(l)-d[1]*Math.sin(l),p[1]=d[0]*Math.sin(l)+d[1]*Math.cos(l),p[2]=d[2],o[0]=p[0]+i[0],o[1]=p[1]+i[1],o[2]=p[2]+i[2],o},v.bG=function(o,t,i,l){var d=[],p=[];return d[0]=t[0]-i[0],d[1]=t[1]-i[1],d[2]=t[2]-i[2],p[0]=d[0],p[1]=d[1]*Math.cos(l)-d[2]*Math.sin(l),p[2]=d[1]*Math.sin(l)+d[2]*Math.cos(l),o[0]=p[0]+i[0],o[1]=p[1]+i[1],o[2]=p[2]+i[2],o},v.bH=function(o,t,i,l){var d=[],p=[];return d[0]=t[0]-i[0],d[1]=t[1]-i[1],d[2]=t[2]-i[2],p[0]=d[2]*Math.sin(l)+d[0]*Math.cos(l),p[1]=d[1],p[2]=d[2]*Math.cos(l)-d[0]*Math.sin(l),o[0]=p[0]+i[0],o[1]=p[1]+i[1],o[2]=p[2]+i[2],o},v.bI=function(o,t,i){var l=Math.sin(i),d=Math.cos(i),p=t[0],g=t[1],y=t[2],S=t[3],w=t[8],P=t[9],T=t[10],D=t[11];return t!==o&&(o[4]=t[4],o[5]=t[5],o[6]=t[6],o[7]=t[7],o[12]=t[12],o[13]=t[13],o[14]=t[14],o[15]=t[15]),o[0]=p*d-w*l,o[1]=g*d-P*l,o[2]=y*d-T*l,o[3]=S*d-D*l,o[8]=p*l+w*d,o[9]=g*l+P*d,o[10]=y*l+T*d,o[11]=S*l+D*d,o},v.bJ=function(o,t){const i=ze(o,360),l=ze(t,360),d=l-i,p=l>i?d-360:d+360;return Math.abs(d)<Math.abs(p)?d:p},v.bK=function(o){return o[0]=0,o[1]=0,o[2]=0,o},v.bL=function(o,t,i,l){const d=Math.sqrt(o*o+t*t),p=Math.sqrt(i*i+l*l);o/=d,t/=d,i/=p,l/=p;const g=Math.acos(o*i+t*l);return-t*i+o*l>0?g:-g},v.bM=function(o,t){const i=ze(o,2*Math.PI),l=ze(t,2*Math.PI);return Math.min(Math.abs(i-l),Math.abs(i-l+2*Math.PI),Math.abs(i-l-2*Math.PI))},v.bN=function(){const o={},t=Ue.$version;for(const i in Ue.$root){const l=Ue.$root[i];if(l.required){let d=null;d=i==="version"?t:l.type==="array"?[]:{},d!=null&&(o[i]=d)}}return o},v.bO=Tp,v.bP=cf,v.bQ=function o(t,i){if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(let l=0;l<t.length;l++)if(!o(t[l],i[l]))return!1;return!0}if(typeof t=="object"&&t!==null&&i!==null){if(typeof i!="object"||Object.keys(t).length!==Object.keys(i).length)return!1;for(const l in t)if(!o(t[l],i[l]))return!1;return!0}return t===i},v.bR=Uu,v.bS=function(o){o=o.slice();const t=Object.create(null);for(let i=0;i<o.length;i++)t[o[i].id]=o[i];for(let i=0;i<o.length;i++)"ref"in o[i]&&(o[i]=Pp(o[i],t[o[i].ref]));return o},v.bT=function(o,t){if(o.type==="custom")return new sF(o,t);switch(o.type){case"background":return new oF(o,t);case"circle":return new SO(o,t);case"color-relief":return new MO(o,t);case"fill":return new GO(o,t);case"fill-extrusion":return new r5(o,t);case"heatmap":return new EO(o,t);case"hillshade":return new CO(o,t);case"line":return new I5(o,t);case"raster":return new sx(o,t);case"symbol":return new Gy(o,t)}},v.bU=o=>o.type==="raster",v.bV=bt,v.bW=function(o,t){if(!o)return[{command:"setStyle",args:[t]}];let i=[];try{if(!Yt(o.version,t.version))return[{command:"setStyle",args:[t]}];Yt(o.center,t.center)||i.push({command:"setCenter",args:[t.center]}),Yt(o.state,t.state)||i.push({command:"setGlobalState",args:[t.state]}),Yt(o.centerAltitude,t.centerAltitude)||i.push({command:"setCenterAltitude",args:[t.centerAltitude]}),Yt(o.zoom,t.zoom)||i.push({command:"setZoom",args:[t.zoom]}),Yt(o.bearing,t.bearing)||i.push({command:"setBearing",args:[t.bearing]}),Yt(o.pitch,t.pitch)||i.push({command:"setPitch",args:[t.pitch]}),Yt(o.roll,t.roll)||i.push({command:"setRoll",args:[t.roll]}),Yt(o.sprite,t.sprite)||i.push({command:"setSprite",args:[t.sprite]}),Yt(o.glyphs,t.glyphs)||i.push({command:"setGlyphs",args:[t.glyphs]}),Yt(o.transition,t.transition)||i.push({command:"setTransition",args:[t.transition]}),Yt(o.light,t.light)||i.push({command:"setLight",args:[t.light]}),Yt(o.terrain,t.terrain)||i.push({command:"setTerrain",args:[t.terrain]}),Yt(o.sky,t.sky)||i.push({command:"setSky",args:[t.sky]}),Yt(o.projection,t.projection)||i.push({command:"setProjection",args:[t.projection]});const l={},d=[];(function(g,y,S,w){let P;for(P in y=y||{},g=g||{})Object.prototype.hasOwnProperty.call(g,P)&&(Object.prototype.hasOwnProperty.call(y,P)||Tg(P,S,w));for(P in y)Object.prototype.hasOwnProperty.call(y,P)&&(Object.prototype.hasOwnProperty.call(g,P)?Yt(g[P],y[P])||(g[P].type==="geojson"&&y[P].type==="geojson"&&L0(g,y,P)?Hn(S,{command:"setGeoJSONSourceData",args:[P,y[P].data]}):Eg(P,y,S,w)):Vs(P,y,S))})(o.sources,t.sources,d,l);const p=[];o.layers&&o.layers.forEach(g=>{"source"in g&&l[g.source]?i.push({command:"removeLayer",args:[g.id]}):p.push(g)}),i=i.concat(d),function(g,y,S){y=y||[];const w=(g=g||[]).map(Cp),P=y.map(Cp),T=g.reduce(Pg,{}),D=y.reduce(Pg,{}),I=w.slice(),N=Object.create(null);let B,q,W,ee,X;for(let te=0,le=0;te<w.length;te++)B=w[te],Object.prototype.hasOwnProperty.call(D,B)?le++:(Hn(S,{command:"removeLayer",args:[B]}),I.splice(I.indexOf(B,le),1));for(let te=0,le=0;te<P.length;te++)B=P[P.length-1-te],I[I.length-1-te]!==B&&(Object.prototype.hasOwnProperty.call(T,B)?(Hn(S,{command:"removeLayer",args:[B]}),I.splice(I.lastIndexOf(B,I.length-le),1)):le++,ee=I[I.length-te],Hn(S,{command:"addLayer",args:[D[B],ee]}),I.splice(I.length-te,0,B),N[B]=!0);for(let te=0;te<P.length;te++)if(B=P[te],q=T[B],W=D[B],!N[B]&&!Yt(q,W))if(Yt(q.source,W.source)&&Yt(q["source-layer"],W["source-layer"])&&Yt(q.type,W.type)){for(X in Gu(q.layout,W.layout,S,B,null,"setLayoutProperty"),Gu(q.paint,W.paint,S,B,null,"setPaintProperty"),Yt(q.filter,W.filter)||Hn(S,{command:"setFilter",args:[B,W.filter]}),Yt(q.minzoom,W.minzoom)&&Yt(q.maxzoom,W.maxzoom)||Hn(S,{command:"setLayerZoomRange",args:[B,W.minzoom,W.maxzoom]}),q)Object.prototype.hasOwnProperty.call(q,X)&&X!=="layout"&&X!=="paint"&&X!=="filter"&&X!=="metadata"&&X!=="minzoom"&&X!=="maxzoom"&&(X.indexOf("paint.")===0?Gu(q[X],W[X],S,B,X.slice(6),"setPaintProperty"):Yt(q[X],W[X])||Hn(S,{command:"setLayerProperty",args:[B,X,W[X]]}));for(X in W)Object.prototype.hasOwnProperty.call(W,X)&&!Object.prototype.hasOwnProperty.call(q,X)&&X!=="layout"&&X!=="paint"&&X!=="filter"&&X!=="metadata"&&X!=="minzoom"&&X!=="maxzoom"&&(X.indexOf("paint.")===0?Gu(q[X],W[X],S,B,X.slice(6),"setPaintProperty"):Yt(q[X],W[X])||Hn(S,{command:"setLayerProperty",args:[B,X,W[X]]}))}else Hn(S,{command:"removeLayer",args:[B]}),ee=I[I.lastIndexOf(B)+1],Hn(S,{command:"addLayer",args:[W,ee]})}(p,t.layers,i)}catch(l){console.warn("Unable to compute style diff:",l),i=[{command:"setStyle",args:[t]}]}return i},v.bX=function(o){const t=[],i=o.id;return i===void 0&&t.push({message:`layers.${i}: missing required property "id"`}),o.render===void 0&&t.push({message:`layers.${i}: missing required method "render"`}),o.renderingMode&&o.renderingMode!=="2d"&&o.renderingMode!=="3d"&&t.push({message:`layers.${i}: property "renderingMode" must be either "2d" or "3d"`}),t},v.bY=Bi,v.bZ=lo,v.b_=class extends En{constructor(o,t){super(o,t),this.current=0}set(o){this.current!==o&&(this.current=o,this.gl.uniform1i(this.location,o))}},v.ba=CE,v.bb=Zd,v.bc=function(o,t,i,l,d){var p=1/Math.tan(t/2);if(o[0]=p/i,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=p,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[11]=-1,o[12]=0,o[13]=0,o[15]=0,d!=null&&d!==1/0){var g=1/(l-d);o[10]=(d+l)*g,o[14]=2*d*l*g}else o[10]=-1,o[14]=-2*l;return o},v.bd=function(o){var t=new J(16);return t[0]=o[0],t[1]=o[1],t[2]=o[2],t[3]=o[3],t[4]=o[4],t[5]=o[5],t[6]=o[6],t[7]=o[7],t[8]=o[8],t[9]=o[9],t[10]=o[10],t[11]=o[11],t[12]=o[12],t[13]=o[13],t[14]=o[14],t[15]=o[15],t},v.be=function(o,t,i){var l=Math.sin(i),d=Math.cos(i),p=t[0],g=t[1],y=t[2],S=t[3],w=t[4],P=t[5],T=t[6],D=t[7];return t!==o&&(o[8]=t[8],o[9]=t[9],o[10]=t[10],o[11]=t[11],o[12]=t[12],o[13]=t[13],o[14]=t[14],o[15]=t[15]),o[0]=p*d+w*l,o[1]=g*d+P*l,o[2]=y*d+T*l,o[3]=S*d+D*l,o[4]=w*d-p*l,o[5]=P*d-g*l,o[6]=T*d-y*l,o[7]=D*d-S*l,o},v.bf=function(o,t,i){var l=Math.sin(i),d=Math.cos(i),p=t[4],g=t[5],y=t[6],S=t[7],w=t[8],P=t[9],T=t[10],D=t[11];return t!==o&&(o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=t[3],o[12]=t[12],o[13]=t[13],o[14]=t[14],o[15]=t[15]),o[4]=p*d+w*l,o[5]=g*d+P*l,o[6]=y*d+T*l,o[7]=S*d+D*l,o[8]=w*d-p*l,o[9]=P*d-g*l,o[10]=T*d-y*l,o[11]=D*d-S*l,o},v.bg=function(o,t){var i=t[0],l=t[1],d=t[2],p=t[3],g=t[4],y=t[5],S=t[6],w=t[7],P=t[8],T=t[9],D=t[10],I=t[11],N=t[12],B=t[13],q=t[14],W=t[15],ee=i*y-l*g,X=i*S-d*g,te=i*w-p*g,le=l*S-d*y,he=l*w-p*y,Se=d*w-p*S,Ee=P*B-T*N,Oe=P*q-D*N,ke=P*W-I*N,Be=T*q-D*B,Ve=T*W-I*B,Fe=D*W-I*q,Le=ee*Fe-X*Ve+te*Be+le*ke-he*Oe+Se*Ee;return Le?(o[0]=(y*Fe-S*Ve+w*Be)*(Le=1/Le),o[1]=(d*Ve-l*Fe-p*Be)*Le,o[2]=(B*Se-q*he+W*le)*Le,o[3]=(D*he-T*Se-I*le)*Le,o[4]=(S*ke-g*Fe-w*Oe)*Le,o[5]=(i*Fe-d*ke+p*Oe)*Le,o[6]=(q*te-N*Se-W*X)*Le,o[7]=(P*Se-D*te+I*X)*Le,o[8]=(g*Ve-y*ke+w*Ee)*Le,o[9]=(l*ke-i*Ve-p*Ee)*Le,o[10]=(N*he-B*te+W*ee)*Le,o[11]=(T*te-P*he-I*ee)*Le,o[12]=(y*Oe-g*Be-S*Ee)*Le,o[13]=(i*Be-l*Oe+d*Ee)*Le,o[14]=(B*X-N*le-q*ee)*Le,o[15]=(P*le-T*X+D*ee)*Le,o):null},v.bh=function(){const o=new Float32Array(16);return ce(o),o},v.bi=function(){const o=new Float64Array(16);return ce(o),o},v.bj=function(){return new Float64Array(16)},v.bk=function(o,t,i){const l=new Float64Array(4);return Ze(l,o,t-90,i),l},v.bl=function(o,t,i,l){var d,p,g,y,S,w=t[0],P=t[1],T=t[2],D=t[3],I=i[0],N=i[1],B=i[2],q=i[3];return(p=w*I+P*N+T*B+D*q)<0&&(p=-p,I=-I,N=-N,B=-B,q=-q),1-p>G?(d=Math.acos(p),g=Math.sin(d),y=Math.sin((1-l)*d)/g,S=Math.sin(l*d)/g):(y=1-l,S=l),o[0]=y*w+S*I,o[1]=y*P+S*N,o[2]=y*T+S*B,o[3]=y*D+S*q,o},v.bm=function(o){const t=new Float64Array(9);var i,l,d,p,g,y,S,w,P,T,D,I,N,B,q,W,ee,X;T=(d=(l=o)[0])*(S=d+d),D=(p=l[1])*S,N=(g=l[2])*S,B=g*(w=p+p),W=(y=l[3])*S,ee=y*w,X=y*(P=g+g),(i=t)[0]=1-(I=p*w)-(q=g*P),i[3]=D-X,i[6]=N+ee,i[1]=D+X,i[4]=1-T-q,i[7]=B-W,i[2]=N-ee,i[5]=B+W,i[8]=1-T-I;const te=js(-Math.asin(Tt(t[2],-1,1)));let le,he;return Math.hypot(t[5],t[8])<.001?(le=0,he=-js(Math.atan2(t[3],t[4]))):(le=js(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),he=js(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:le,pitch:te+90,bearing:he}},v.bn=function(o,t){return o.roll==t.roll&&o.pitch==t.pitch&&o.bearing==t.bearing},v.bo=Rt,v.bp=Fo,v.bq=Bd,v.br=Df,v.bs=Nd,v.bt=Je,v.bu=mt,v.bv=On,v.bw=function(o,t,i,l,d){return Je(l,d,Tt((o-t)/(i-t),0,1))},v.bx=function(o,t,i,l){return o[0]=t[0]+i[0]*l,o[1]=t[1]+i[1]*l,o[2]=t[2]+i[2]*l,o},v.by=ze,v.bz=function(){return new Float64Array(3)},v.c=os,v.c$=kc,v.c0=class extends En{constructor(o,t){super(o,t),this.current=fo}set(o){if(o[12]!==this.current[12]||o[0]!==this.current[0])return this.current=o,void this.gl.uniformMatrix4fv(this.location,!1,o);for(let t=1;t<16;t++)if(o[t]!==this.current[t]){this.current=o,this.gl.uniformMatrix4fv(this.location,!1,o);break}}},v.c1=gs,v.c2=class extends En{constructor(o,t){super(o,t),this.current=[0,0,0]}set(o){o[0]===this.current[0]&&o[1]===this.current[1]&&o[2]===this.current[2]||(this.current=o,this.gl.uniform3f(this.location,o[0],o[1],o[2]))}},v.c3=class extends En{constructor(o,t){super(o,t),this.current=[0,0]}set(o){o[0]===this.current[0]&&o[1]===this.current[1]||(this.current=o,this.gl.uniform2f(this.location,o[0],o[1]))}},v.c4=ue,v.c5=function(o,t){var i=Math.sin(t),l=Math.cos(t);return o[0]=l,o[1]=i,o[2]=0,o[3]=-i,o[4]=l,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o},v.c6=function(o,t,i){var l=t[0],d=t[1],p=t[2];return o[0]=l*i[0]+d*i[3]+p*i[6],o[1]=l*i[1]+d*i[4]+p*i[7],o[2]=l*i[2]+d*i[5]+p*i[8],o},v.c7=function(o,t,i,l,d,p,g){var y=1/(t-i),S=1/(l-d),w=1/(p-g);return o[0]=-2*y,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*S,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*w,o[11]=0,o[12]=(t+i)*y,o[13]=(d+l)*S,o[14]=(g+p)*w,o[15]=1,o},v.c8=class extends En{constructor(o,t){super(o,t),this.current=new Array}set(o){if(o!=this.current){this.current=o;const t=new Float32Array(4*o.length);for(let i=0;i<o.length;i++)t[4*i]=o[i].r,t[4*i+1]=o[i].g,t[4*i+2]=o[i].b,t[4*i+3]=o[i].a;this.gl.uniform4fv(this.location,t)}}},v.c9=class extends En{constructor(o,t){super(o,t),this.current=new Array}set(o){if(o!=this.current){this.current=o;const t=new Float32Array(o);this.gl.uniform1fv(this.location,t)}}},v.cA=function(o,t){return wp[t]&&"touches"in o},v.cB=function(o){return wp[o]||Sp[o]},v.cC=function(o,t,i){var l=t[0],d=t[1];return o[0]=i[0]*l+i[4]*d+i[12],o[1]=i[1]*l+i[5]*d+i[13],o},v.cD=function(o,t){const{x:i,y:l}=Vf.fromLngLat(t);return!(o<0||o>25||l<0||l>=1||i<0||i>=1)},v.cE=function(o,t){return o[0]=t[0],o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=t[1],o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=t[2],o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o},v.cF=class extends Ed{},v.cG=Va,v.cH=function(o,t){os.REGISTERED_PROTOCOLS[o]=t},v.cI=function(o){delete os.REGISTERED_PROTOCOLS[o]},v.cJ=function(o,t){const i={};for(let d=0;d<o.length;d++){const p=t&&t[o[d].id]||J0(o[d]);t&&(t[o[d].id]=p);let g=i[p];g||(g=i[p]=[]),g.push(o[d])}const l=[];for(const d in i)l.push(i[d]);return l},v.cK=ct,v.cL=IE,v.cM=sP,v.cN=uE,v.cO=function(o){var t,i;o.bucket.createArrays(),o.bucket.tilePixelRatio=Pe/(512*o.bucket.overscaling),o.bucket.compareText={},o.bucket.iconsNeedLinear=!1;const l=o.bucket.layers[0],d=l.layout,p=l._unevaluatedLayout._values,g={layoutIconSize:p["icon-size"].possiblyEvaluate(new or(o.bucket.zoom+1),o.canonical),layoutTextSize:p["text-size"].possiblyEvaluate(new or(o.bucket.zoom+1),o.canonical),textMaxSize:p["text-size"].possiblyEvaluate(new or(18))};if(o.bucket.textSizeData.kind==="composite"){const{minZoom:T,maxZoom:D}=o.bucket.textSizeData;g.compositeTextSizes=[p["text-size"].possiblyEvaluate(new or(T),o.canonical),p["text-size"].possiblyEvaluate(new or(D),o.canonical)]}if(o.bucket.iconSizeData.kind==="composite"){const{minZoom:T,maxZoom:D}=o.bucket.iconSizeData;g.compositeIconSizes=[p["icon-size"].possiblyEvaluate(new or(T),o.canonical),p["icon-size"].possiblyEvaluate(new or(D),o.canonical)]}const y=d.get("text-line-height")*Jr,S=d.get("text-rotation-alignment")!=="viewport"&&d.get("symbol-placement")!=="point",w=d.get("text-keep-upright"),P=d.get("text-size");for(const T of o.bucket.features){const D=d.get("text-font").evaluate(T,{},o.canonical).join(","),I=P.evaluate(T,{},o.canonical),N=g.layoutTextSize.evaluate(T,{},o.canonical),B=g.layoutIconSize.evaluate(T,{},o.canonical),q={horizontal:{},vertical:void 0},W=T.text;let ee,X=[0,0];if(W){const he=W.toString(),Se=d.get("text-letter-spacing").evaluate(T,{},o.canonical)*Jr,Ee=bd(he)?Se:0,Oe=d.get("text-anchor").evaluate(T,{},o.canonical),ke=vP(l,T,o.canonical);if(!ke){const Le=d.get("text-radial-offset").evaluate(T,{},o.canonical);X=Le?_P(Oe,[Le*Jr,hb]):d.get("text-offset").evaluate(T,{},o.canonical).map(Ye=>Ye*Jr)}
458let Be=S?"center":d.get("text-justify").evaluate(T,{},o.canonical);const Ve=d.get("symbol-placement")==="point"?d.get("text-max-width").evaluate(T,{},o.canonical)*Jr:1/0,Fe=()=>{o.bucket.allowVerticalPlacement&&uf(he)&&(q.vertical=Uy(W,o.glyphMap,o.glyphPositions,o.imagePositions,D,Ve,y,Oe,"left",Ee,X,v.ax.vertical,!0,N,I))};if(!S&&ke){const Le=new Set;if(Be==="auto")for(let st=0;st<ke.values.length;st+=2)Le.add(pb(ke.values[st]));else Le.add(Be);let Ye=!1;for(const st of Le)if(!q.horizontal[st])if(Ye)q.horizontal[st]=q.horizontal[0];else{const tt=Uy(W,o.glyphMap,o.glyphPositions,o.imagePositions,D,Ve,y,"center",st,Ee,X,v.ax.horizontal,!1,N,I);tt&&(q.horizontal[st]=tt,Ye=tt.positionedLines.length===1)}Fe()}else{Be==="auto"&&(Be=pb(Oe));const Le=Uy(W,o.glyphMap,o.glyphPositions,o.imagePositions,D,Ve,y,Oe,Be,Ee,X,v.ax.horizontal,!1,N,I);Le&&(q.horizontal[Be]=Le),Fe(),uf(he)&&S&&w&&(q.vertical=Uy(W,o.glyphMap,o.glyphPositions,o.imagePositions,D,Ve,y,Oe,Be,Ee,X,v.ax.vertical,!1,N,I))}}let te=!1;if(!((t=T.icon)===null||t===void 0)&&t.name){const he=o.imageMap[T.icon.name];he&&(ee=tF(o.imagePositions[T.icon.name],d.get("icon-offset").evaluate(T,{},o.canonical),d.get("icon-anchor").evaluate(T,{},o.canonical)),te=!!he.sdf,o.bucket.sdfIcons===void 0?o.bucket.sdfIcons=te:o.bucket.sdfIcons!==te&&Nr("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(he.pixelRatio!==o.bucket.pixelRatio||d.get("icon-rotate").constantOr(1)!==0)&&(o.bucket.iconsNeedLinear=!0))}const le=bP(q.horizontal)||q.vertical;(i=o.bucket).iconsInText||(i.iconsInText=!!le&&le.iconsInText),(le||ee)&&XF(o.bucket,T,q,ee,o.imageMap,g,N,B,X,te,o.canonical,o.subdivisionGranularity)}o.showCollisionBoxes&&o.bucket.generateCollisionDebugBuffers()},v.cP=_x,v.cQ=xx,v.cR=Ox,v.cS=function(o,t=""){const i=new Vy;return function(l,d,p=""){for(const g in l.layers)d.writeMessage(3,(y,S)=>zF(y,S,p),l.layers[g])}(o,i,t),i.finish()},v.cT=function(o,t,i,l,d,p){let g=cP(o,t,i,d,0);return g=cP(g,t,l,p,1),g},v.cU=class{constructor(o){this.maxEntries=o,this.map=new Map}get(o){const t=this.map.get(o);return t!==void 0&&(this.map.delete(o),this.map.set(o,t)),t}set(o,t){if(this.map.has(o))this.map.delete(o);else if(this.map.size>=this.maxEntries){const i=this.map.keys().next().value;this.map.delete(i)}this.map.set(o,t)}clear(){this.map.clear()}},v.cV=DT,v.cW=Vy,v.cX=iP,v.cY=function(o,t,i,l,d){return c(this,void 0,void 0,function*(){if(Q())try{return yield bp(o,t,i,l,d)}catch{}return function(p,g,y,S,w){const P=p.width,T=p.height;ns&&Ba||(ns=new OffscreenCanvas(P,T),Ba=ns.getContext("2d",{willReadFrequently:!0})),ns.width=P,ns.height=T,Ba.drawImage(p,0,0,P,T);const D=Ba.getImageData(g,y,S,w);return Ba.clearRect(0,0,P,T),D.data}(o,t,i,l,d)})},v.cZ=bT,v.c_=class{constructor(o,t){this.layers={[Gf]:this},this.name=Gf,this.version=t?t.version:1,this.extent=t?t.extent:4096,this.length=o.length,this.features=o}feature(o){return new LF(this.features[o],this.extent)}},v.ca=class extends sa{},v.cb=k5,v.cc=class extends Yc{},v.cd=px,v.ce=function(o){return o<=1?1:Math.pow(2,Math.ceil(Math.log(o)/Math.LN2))},v.cf=yT,v.cg=function(o,t,i){var l=t[0],d=t[1],p=t[2],g=i[3]*l+i[7]*d+i[11]*p+i[15];return o[0]=(i[0]*l+i[4]*d+i[8]*p+i[12])/(g=g||1),o[1]=(i[1]*l+i[5]*d+i[9]*p+i[13])/g,o[2]=(i[2]*l+i[6]*d+i[10]*p+i[14])/g,o},v.ch=class extends Pd{},v.ci=class extends n{},v.cj=function(o,t){return o[0]===t[0]&&o[1]===t[1]&&o[2]===t[2]&&o[3]===t[3]&&o[4]===t[4]&&o[5]===t[5]&&o[6]===t[6]&&o[7]===t[7]&&o[8]===t[8]&&o[9]===t[9]&&o[10]===t[10]&&o[11]===t[11]&&o[12]===t[12]&&o[13]===t[13]&&o[14]===t[14]&&o[15]===t[15]},v.ck=function(o,t){var i=o[0],l=o[1],d=o[2],p=o[3],g=o[4],y=o[5],S=o[6],w=o[7],P=o[8],T=o[9],D=o[10],I=o[11],N=o[12],B=o[13],q=o[14],W=o[15],ee=t[0],X=t[1],te=t[2],le=t[3],he=t[4],Se=t[5],Ee=t[6],Oe=t[7],ke=t[8],Be=t[9],Ve=t[10],Fe=t[11],Le=t[12],Ye=t[13],st=t[14],tt=t[15];return Math.abs(i-ee)<=G*Math.max(1,Math.abs(i),Math.abs(ee))&&Math.abs(l-X)<=G*Math.max(1,Math.abs(l),Math.abs(X))&&Math.abs(d-te)<=G*Math.max(1,Math.abs(d),Math.abs(te))&&Math.abs(p-le)<=G*Math.max(1,Math.abs(p),Math.abs(le))&&Math.abs(g-he)<=G*Math.max(1,Math.abs(g),Math.abs(he))&&Math.abs(y-Se)<=G*Math.max(1,Math.abs(y),Math.abs(Se))&&Math.abs(S-Ee)<=G*Math.max(1,Math.abs(S),Math.abs(Ee))&&Math.abs(w-Oe)<=G*Math.max(1,Math.abs(w),Math.abs(Oe))&&Math.abs(P-ke)<=G*Math.max(1,Math.abs(P),Math.abs(ke))&&Math.abs(T-Be)<=G*Math.max(1,Math.abs(T),Math.abs(Be))&&Math.abs(D-Ve)<=G*Math.max(1,Math.abs(D),Math.abs(Ve))&&Math.abs(I-Fe)<=G*Math.max(1,Math.abs(I),Math.abs(Fe))&&Math.abs(N-Le)<=G*Math.max(1,Math.abs(N),Math.abs(Le))&&Math.abs(B-Ye)<=G*Math.max(1,Math.abs(B),Math.abs(Ye))&&Math.abs(q-st)<=G*Math.max(1,Math.abs(q),Math.abs(st))&&Math.abs(W-tt)<=G*Math.max(1,Math.abs(W),Math.abs(tt))},v.cl=function(o,t){return o[0]=t[0],o[1]=t[1],o[2]=t[2],o[3]=t[3],o[4]=t[4],o[5]=t[5],o[6]=t[6],o[7]=t[7],o[8]=t[8],o[9]=t[9],o[10]=t[10],o[11]=t[11],o[12]=t[12],o[13]=t[13],o[14]=t[14],o[15]=t[15],o},v.cm=o=>o.type==="circle",v.cn=o=>o.type==="heatmap",v.co=o=>o.type==="line",v.cp=o=>o.type==="fill",v.cq=o=>o.type==="fill-extrusion",v.cr=o=>o.type==="hillshade",v.cs=o=>o.type==="color-relief",v.ct=o=>o.type==="background",v.cu=o=>o.type==="custom",v.cv=ht,v.cw=function(o,t,i){if(t<=0)return o;const l=1/t;return i===void 0||Math.abs(i)<1e-10?Math.round(o*l)/l:(i>0?Math.ceil(o*l-1e-9):Math.floor(o*l+1e-10))/l},v.cx=function(o,t,i){const l=Ae(t.x-i.x,t.y-i.y),d=Ae(o.x-i.x,o.y-i.y);var p,g;return js(Math.atan2(l[0]*d[1]-l[1]*d[0],(p=l)[0]*(g=d)[0]+p[1]*g[1]))},v.cy=Ct,v.cz=function(o,t){var i;if(!Sp[t])return!1;const l=o==null?void 0:o.target,d=((i=l==null?void 0:l.ownerDocument)===null||i===void 0?void 0:i.defaultView)||window;return o instanceof d.MouseEvent||o instanceof d.WheelEvent},v.d=ot,v.d0=class{constructor(o,t){const i=(t=this.options=Object.assign({},b5,t)).debug;if(i&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");let l=Ex(o,t);
458i&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles")),l=Mx(l,t),t.updateable&&(this.source=l),this.initializeIndex(l,t)}initializeIndex(o,t){this.tileIndex=t.cluster?new f5(t.clusterOptions):new x5(t),o.length&&this.tileIndex.initialize(o)}getTile(o,t,i){return t=+t,i=+i,(o=+o)<0||o>24?null:this.tileIndex.getTile(o,t,i)}updateData(o,t){const i=this.options;if(!i.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:l,source:d}=function(p,g,y){const S=function(P,T){var D,I;return P?{removeAll:P.removeAll,remove:new Set(P.remove||[]),add:new Map((D=P.add)==null?void 0:D.map(N=>[T.promoteId?N.properties[T.promoteId]:N.id,N])),update:new Map((I=P.update)==null?void 0:I.map(N=>[N.id,N]))}:{remove:new Set,add:new Map,update:new Map}}(g,y);let w=[];if(S.removeAll&&(w=p,p=[]),S.remove.size||S.add.size){const P=[];for(const T of p)(S.remove.has(T.id)||S.add.has(T.id))&&P.push(T);if(P.length){w.push(...P);const T=new Set(P.map(D=>D.id));p=p.filter(D=>!T.has(D.id))}if(S.add.size){let T=Ex({type:"FeatureCollection",features:Array.from(S.add.values())},y);T=Mx(T,y),w.push(...T),p.push(...T)}}if(S.update.size){const P=new Map,T=[];for(const D of p)S.update.has(D.id)?P.set(D.id,[...P.get(D.id)||[],D]):T.push(D);for(const[D,I]of S.update){const N=P.get(D);if(!N||N.length===0)continue;const B=p5(N,I,y);w.push(...N,...B),T.push(...B)}p=T}return{affected:w,source:p}}(this.source,o,i);t&&({affected:l,source:d}=this.filterUpdate(d,l,t)),l.length&&(this.source=d,this.tileIndex.updateIndex(d,l,i))}filterUpdate(o,t,i){const l=new Set;for(const d of o)d.id!=null&&(i(Fy(d))||(t.push(d),l.add(d.id)));return{affected:t,source:o=o.filter(d=>!l.has(d.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(o=>Fy(o))}}updateClusterOptions(o,t){const i=this.options.cluster;this.options.cluster=o,this.options.clusterOptions=t,i!=o?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(o){return this.tileIndex.getClusterExpansionZoom(o)}getClusterChildren(o){return this.tileIndex.getChildren(o)}getClusterLeaves(o,t,i){return this.tileIndex.getLeaves(o,t,i)}},v.d1=zo,v.e=zt,v.f=Vi,v.g=Mo,v.h=o=>c(void 0,void 0,void 0,function*(){if(o.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(o)],{type:"image/png"});try{return createImageBitmap(t)}catch(i){throw new Error(`Could not load image because of ${ot(i).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),v.i=Wr,v.j=o=>new Promise((t,i)=>{const l=new Image;l.onload=()=>{t(l),URL.revokeObjectURL(l.src),l.onload=null,window.requestAnimationFrame(()=>l.src=rs)},l.onerror=()=>i(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const d=new Blob([new Uint8Array(o)],{type:"image/png"});l.src=o.byteLength?URL.createObjectURL(d):rs}),v.k=(o,t)=>Ns(zt(o,{type:"json"}),t),v.l=$a,v.m=Ns,v.n=mc,v.o=(o,t)=>Ns(zt(o,{type:"arrayBuffer"}),t),v.p=cE,v.q=function(o){return new Vy(o).readFields(Z5,[])},v.r=function(o){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(o))},v.s=Bu,v.t=If,v.u=Fn,v.v=Bc,v.w=Nr,v.x=Ue,v.y=gf,v.z=ci}),m("worker",["./shared"],function(v){class c{constructor(re,se){this.keyCache={},re&&this.replace(re,se)}replace(re,se){this._layerConfigs={},this._layers={},this.update(re,[],se)}update(re,se,ve){for(const qe of re){this._layerConfigs[qe.id]=qe;const $e=this._layers[qe.id]=v.bT(qe,ve);$e._featureFilter=v.ah($e.filter,ve),this.keyCache[qe.id]&&delete this.keyCache[qe.id]}for(const qe of se)delete this.keyCache[qe],delete this._layerConfigs[qe],delete this._layers[qe];this.familiesBySource={};const Me=v.cJ(Object.values(this._layerConfigs),this.keyCache);for(const qe of Me){const $e=qe.map(Ke=>this._layers[Ke.id]),De=$e[0];if(De.isHidden())continue;const Ze=De.source||"";let We=this.familiesBySource[Ze];We||(We=this.familiesBySource[Ze]={});const Ae=De.sourceLayer||v.ag;let Pe=We[Ae];Pe||(Pe=We[Ae]=[]),Pe.push($e)}}}class A{constructor(re){const se={},ve=[];for(const De in re){const Ze=re[De],We=se[De]={};for(const Ae in Ze){const Pe=Ze[+Ae];if(!Pe||Pe.bitmap.width===0||Pe.bitmap.height===0)continue;const Ke={x:0,y:0,w:Pe.bitmap.width+2,h:Pe.bitmap.height+2};ve.push(Ke),We[Ae]={rect:Ke,metrics:Pe.metrics}}}const{w:Me,h:qe}=v.p(ve),$e=new v.t({width:Me||1,height:qe||1});for(const De in re){const Ze=re[De];for(const We in Ze){const Ae=Ze[+We];if(!Ae||Ae.bitmap.width===0||Ae.bitmap.height===0)continue;const Pe=se[De][We].rect;v.t.copy(Ae.bitmap,$e,{x:0,y:0},{x:Pe.x+1,y:Pe.y+1},Ae.bitmap)}}this.image=$e,this.positions=se}}v.cK("GlyphAtlas",A);class L{constructor(re){this.tileID=new v.a3(re.tileID.overscaledZ,re.tileID.wrap,re.tileID.canonical.z,re.tileID.canonical.x,re.tileID.canonical.y),this.uid=re.uid,this.zoom=re.zoom,this.pixelRatio=re.pixelRatio,this.tileSize=re.tileSize,this.source=re.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=re.showCollisionBoxes,this.collectResourceTiming=!!re.collectResourceTiming,this.returnDependencies=!!re.returnDependencies,this.promoteId=re.promoteId,this.inFlightDependencies=[]}parse(re,se,ve,Me,qe){return v._(this,void 0,void 0,function*(){this.status="parsing",this.data=re,this.collisionBoxArray=new v.ae;const $e=new v.cL(Object.keys(re.layers).sort()),De=new v.cM(this.tileID,this.promoteId);De.bucketLayerIDs=[];const Ze={},We={featureIndex:De,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:ve,subdivisionGranularity:qe},Ae=se.familiesBySource[this.source];for(const bt in Ae){const mr=re.layers[bt];if(!mr)continue;mr.version===1&&v.w(`Vector tile source "${this.source}" layer "${bt}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Nr=$e.encode(bt),Ln=[];for(let Wr=0;Wr<mr.length;Wr++){const bn=mr.feature(Wr),Io=De.getId(bn,bt);
458Ln.push({feature:bn,id:Io,index:Wr,sourceLayerIndex:Nr})}for(const Wr of Ae[bt]){const bn=Wr[0];bn.source!==this.source&&v.w(`layer.source = ${bn.source} does not equal this.source = ${this.source}`),bn.isHidden(this.zoom,!0)||(z(Wr,this.zoom,ve),(Ze[bn.id]=bn.createBucket({index:De.bucketLayerIDs.length,layers:Wr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Nr,sourceID:this.source})).populate(Ln,We,this.tileID.canonical),De.bucketLayerIDs.push(Wr.map(Io=>Io.id)))}}const Pe=v.bY(We.glyphDependencies,bt=>Object.keys(bt).map(Number));for(const bt of this.inFlightDependencies)bt==null||bt.abort();this.inFlightDependencies=[];let Ke=Promise.resolve({});if(Object.keys(Pe).length){const bt=new AbortController;this.inFlightDependencies.push(bt),Ke=Me.sendAsync({type:"GG",data:{stacks:Pe,source:this.source,tileID:this.tileID,type:"glyphs"}},bt)}const ot=Object.keys(We.iconDependencies);let ze=Promise.resolve({});if(ot.length){const bt=new AbortController;this.inFlightDependencies.push(bt),ze=Me.sendAsync({type:"GI",data:{icons:ot,source:this.source,tileID:this.tileID,type:"icons"}},bt)}const Je=Object.keys(We.patternDependencies);let mt=Promise.resolve({});if(Je.length){const bt=new AbortController;this.inFlightDependencies.push(bt),mt=Me.sendAsync({type:"GI",data:{icons:Je,source:this.source,tileID:this.tileID,type:"patterns"}},bt)}const ht=We.dashDependencies;let Ct=Promise.resolve({});if(Object.keys(ht).length){const bt=new AbortController;this.inFlightDependencies.push(bt),Ct=Me.sendAsync({type:"GDA",data:{dashes:ht}},bt)}const[Tt,cr,zt,xn]=yield Promise.all([Ke,ze,mt,Ct]),Bi=new A(Tt),lo=new v.cN(cr,zt);for(const bt in Ze){const mr=Ze[bt];mr instanceof v.af?(z(mr.layers,this.zoom,ve),v.cO({bucket:mr,glyphMap:Tt,glyphPositions:Bi.positions,imageMap:cr,imagePositions:lo.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:We.subdivisionGranularity})):mr.hasDependencies&&(mr instanceof v.cP||mr instanceof v.cQ||mr instanceof v.cR)&&(z(mr.layers,this.zoom,ve),mr.addFeatures(We,this.tileID.canonical,lo.patternPositions,xn))}return this.status="done",{buckets:Object.values(Ze).filter(bt=>!bt.isEmpty()),featureIndex:De,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Bi.image,imageAtlas:lo,dashPositions:xn,glyphMap:this.returnDependencies?Tt:null,iconMap:this.returnDependencies?cr:null,glyphPositions:this.returnDependencies?Bi.positions:null}})}}function z(Ce,re,se){const ve=new v.J(re);for(const Me of Ce)Me.recalculate(ve,se)}class j{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(re,se){this.loading[re]=se}finishLoading(re){delete this.loading[re]}abort(re){const se=this.loading[re];se!=null&&se.abort&&(se.abort.abort(),delete this.loading[re])}setParsing(re,se){this.parsing[re]=se}consumeParsing(re){const se=this.parsing[re];if(se)return delete this.parsing[re],se}clearParsing(re){delete this.parsing[re]}markLoaded(re,se){this.loaded[re]=se}getLoaded(re){const se=this.loaded[re];if(se)return se}removeLoaded(re){delete this.loaded[re]}clearLoaded(){this.loaded={}}}class V{constructor(re){this.start=`${re}#start`,this.end=`${re}#end`,this.measure=re,performance.mark(this.start)}finish(){performance.mark(this.end);let re=performance.getEntriesByName(this.measure);return re.length===0&&(performance.measure(this.measure,this.start,this.end),re=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),re}}class Z{constructor(re,se,ve,Me,qe){this.type=re,this.properties=ve||{},this.extent=qe,this.pointsArray=se,this.id=Me}loadGeometry(){return this.pointsArray.map(re=>re.map(se=>new v.P(se.x,se.y)))}}class K{constructor(re,se,ve){this.version=2,this._myFeatures=re,this.name=se,this.length=re.length,this.extent=ve}feature(re){return this._myFeatures[re]}}class Y{constructor(){this.layers={}}addLayer(re){this.layers[re.name]=re}}function ie(Ce){let re=v.cS(Ce);return re.byteOffset===0&&re.byteLength===re.buffer.byteLength||(re=new Uint8Array(re)),{vectorTile:Ce,rawData:re.buffer}}function Q(Ce,re,se){const{extent:ve}=Ce,Me=Math.pow(2,se.z-re.z),qe=(se.x-re.x*Me)*ve,$e=(se.y-re.y*Me)*ve,De=[];for(let Ze=0;Ze<Ce.length;Ze++){const We=Ce.feature(Ze);let Ae=We.loadGeometry();for(const Ke of Ae)for(const ot of Ke)ot.x=ot.x*Me-qe,ot.y=ot.y*Me-$e;const Pe=128;Ae=v.cT(Ae,We.type,-Pe,-Pe,ve+Pe,ve+Pe),Ae.length!==0&&De.push(new Z(We.type,Ae,We.properties,We.id,ve))}return new K(De,Ce.name,ve)}class G{constructor(re,se,ve){this.actor=re,this.layerIndex=se,this.availableImages=ve,this.tileState=new j,this.overzoomedTileResultCache=new v.cU(1e3)}loadVectorTile(re,se){try{return{vectorTile:re.encoding!=="mlt"?new v.cV(new v.cW(se)):new v.cX(se),rawData:se}}catch(ve){const Me=new Uint8Array(se);let qe=`Unable to parse the tile at ${re.request.url}, `;throw qe+=Me[0]===31&&Me[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${v.d(ve).message}`,new Error(qe)}}loadTile(re){return v._(this,void 0,void 0,function*(){const{uid:se,overzoomParameters:ve}=re;ve&&(re.request=ve.overzoomRequest);const Me=this._startRequestTiming(re),qe=new L(re);this.tileState.startLoading(se,qe);const $e=new AbortController;qe.abort=$e;try{const De=yield v.o(re.request,$e);if(re.etag&&re.etag===De.etag)return this.tileState.finishLoading(se),this._getEtagUnmodifiedResult(De,Me);const Ze=this.loadVectorTile(re,De.data);if(this.tileState.finishLoading(se),!Ze)return null;let{vectorTile:We,rawData:Ae}=Ze;ve&&({vectorTile:We,rawData:Ae}=this._getOverzoomTile(re,We));const Pe=this._getExpiryData(De),Ke=this._finishRequestTiming(Me);qe.vectorTile=We,this.tileState.markLoaded(se,qe);const ot={rawData:Ae,cacheControl:Pe,resourceTiming:Ke};this.tileState.setParsing(se,ot);try{return yield this._parseWorkerTile(qe,re,ot)}finally{this.tileState.clearParsing(se)}}catch(De){throw this.tileState.finishLoading(se),qe.status="done",this.tileState.markLoaded(se,qe),De}})}_getEtagUnmodifiedResult(re,se){const ve=this._getExpiryData(re),Me=this._finishRequestTiming(se);return v.e({etagUnmodified:!0},ve,Me)}_parseWorkerTile(re,se,ve){return v._(this,void 0,void 0,function*(){let Me=yield re.parse(re.vectorTile,this.layerIndex,this.availableImages,this.actor,se.subdivisionGranularity);if(ve){const{rawData:qe,cacheControl:$e,resourceTiming:De}=ve;Me=v.e({rawTileData:qe.slice(0),encoding:se.encoding},Me,$e,De)}return Me})}_getExpiryData({expires:re,cacheControl:se,etag:ve}){const Me={};return re&&(Me.expires=re),se&&(Me.cacheControl=se),ve&&(Me.etag=ve),Me}_startRequestTiming(re){var se;if(!((se=re.request)===null||se===void 0)&&se.collectResourceTiming)return new V(re.request.url)}_finishRequestTiming(re){const se=re==null?void 0:re.finish();return se?{resourceTiming:JSON.parse(JSON.stringify(se))}:{}}_getOverzoomTile(re,se){var ve;const{tileID:Me,source:qe,overzoomParameters:$e}=re,{maxZoomTileID:De}=$e,Ze=`${De.key}_${Me.key}_${(ve=re.request)===null||ve===void 0?void 0:ve.url}`,We=this.overzoomedTileResultCache.get(Ze);if(We)return We;const Ae=new Y,Pe=this.layerIndex.familiesBySource[qe];for(const ot in Pe){const ze=se.layers[ot];if(!ze)continue;const Je=Q(ze,De,Me.canonical);Je.length>0&&Ae.addLayer(Je)}const Ke=ie(Ae);return this.overzoomedTileResultCache.set(Ze,Ke),Ke}reloadTile(re){return v._(this,void 0,void 0,function*(){const se=re.uid,ve=this.tileState.getLoaded(se);if(!ve)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(ve.showCollisionBoxes=re.showCollisionBoxes,ve.status==="parsing"){const Me=this.tileState.consumeParsing(se);return yield this._parseWorkerTile(ve,re,Me)}if(ve.status==="done"&&ve.vectorTile)return yield this._parseWorkerTile(ve,re)})}abortTile(re){return v._(this,void 0,void 0,function*(){this.tileState.abort(re.uid)})}removeTile(re){return v._(this,void 0,void 0,function*(){this.tileState.removeLoaded(re.uid)})}}class J{constructor(){this.loaded={}}loadTile(re){return v._(this,void 0,void 0,function*(){const{uid:se,encoding:ve,rawImageData:Me,redFactor:qe,greenFactor:$e,blueFactor:
458De,baseShift:Ze}=re,We=Me.width+2,Ae=Me.height+2,Pe=v.b(Me)?new v.R({width:We,height:Ae},yield v.cY(Me,-1,-1,We,Ae)):Me,Ke=new v.cZ(se,Pe,ve,qe,$e,De,Ze);return this.loaded||(this.loaded={}),this.loaded[se]=Ke,Ke})}removeTile(re){const se=this.loaded,ve=re.uid;se!=null&&se[ve]&&delete se[ve]}}class ue{constructor(re,se,ve,Me=ce){this.actor=re,this.layerIndex=se,this.availableImages=ve,this.tileState=new j,this._createGeoJSONIndex=Me}loadVectorTile(re){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const{z:se,x:ve,y:Me}=re.tileID.canonical,qe=this._geoJSONIndex.getTile(se,ve,Me);return qe?ie(new v.c_(qe.features,{version:2,extent:v.a6})):null}loadTile(re){return v._(this,void 0,void 0,function*(){const{uid:se}=re,ve=new L(re);ve.abort=new AbortController;try{const Me=this.loadVectorTile(re);if(!Me)return null;const{vectorTile:qe,rawData:$e}=Me;ve.vectorTile=qe,this.tileState.markLoaded(se,ve);const De={rawData:$e};this.tileState.setParsing(se,De);try{return yield this._parseWorkerTile(ve,re,De)}finally{this.tileState.clearParsing(se)}}catch(Me){throw ve.status="done",this.tileState.markLoaded(se,ve),Me}})}_reloadLoadedTile(re){return v._(this,void 0,void 0,function*(){const se=re.uid,ve=this.tileState.getLoaded(se);if(!ve)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(ve.showCollisionBoxes=re.showCollisionBoxes,ve.status==="parsing"){const Me=this.tileState.consumeParsing(se);return yield this._parseWorkerTile(ve,re,Me)}if(ve.status==="done"&&ve.vectorTile)return yield this._parseWorkerTile(ve,re)})}_parseWorkerTile(re,se,ve){return v._(this,void 0,void 0,function*(){let Me=yield re.parse(re.vectorTile,this.layerIndex,this.availableImages,this.actor,se.subdivisionGranularity);if(ve){const{rawData:qe}=ve;Me=v.e({rawTileData:qe.slice(0),encoding:"mvt"},Me)}return Me})}abortTile(re){return v._(this,void 0,void 0,function*(){this.tileState.abort(re.uid)})}removeTile(re){return v._(this,void 0,void 0,function*(){this.tileState.removeLoaded(re.uid)})}loadData(re){return v._(this,void 0,void 0,function*(){var se;(se=this._pendingRequest)===null||se===void 0||se.abort();const ve=this._startRequestTiming(re);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(re,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();const Me={};return re.request&&(Me.data=re.data),this._finishRequestTiming(ve,re,Me),Me}catch(Me){if(delete this._pendingRequest,!v.$(Me))throw Me;return{abandoned:!0}}})}_startRequestTiming(re){var se;if(!((se=re.request)===null||se===void 0)&&se.collectResourceTiming)return new V(re.request.url)}_finishRequestTiming(re,se,ve){const Me=re==null?void 0:re.finish();Me&&(ve.resourceTiming={[se.source]:JSON.parse(JSON.stringify(Me))})}reloadTile(re){return this.tileState.getLoaded(re.uid)?this._reloadLoadedTile(re):this.loadTile(re)}loadAndProcessGeoJSON(re,se){return v._(this,void 0,void 0,function*(){var ve;if(re.request&&(re.data=(yield v.k(re.request,se)).data),re.data)return re.data=this._filterGeoJSON(re.data,re.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(re.data,re));if(re.dataDiff)return(ve=this._geoJSONIndex)!==null&&ve!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},re)),void this._geoJSONIndex.updateData(re.dataDiff,this._getFilterPredicate(re.filter));if(re.updateCluster&&this._geoJSONIndex.updateClusterOptions(re.geojsonVtOptions.cluster,xe(re)),this._geoJSONIndex==null)throw new Error(`Input data given to '${re.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(re,se){if(re.type!=="FeatureCollection")return re;const ve=this._getFilterPredicate(se);return ve?{type:"FeatureCollection",features:re.features.filter(Me=>ve(Me))}:re}_getFilterPredicate(re){if(typeof re!="boolean"&&!(re!=null&&re.length))return;const se=v.c$(re,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(se.result==="error")throw new Error(se.value.map(ve=>`${ve.key}: ${ve.message}`).join(", "));return ve=>se.value.evaluate({zoom:0},ve)}removeSource(re){return v._(this,void 0,void 0,function*(){var se;
458(se=this._pendingRequest)===null||se===void 0||se.abort()})}getClusterExpansionZoom(re){return this._geoJSONIndex.getClusterExpansionZoom(re.clusterId)}getClusterChildren(re){return this._geoJSONIndex.getClusterChildren(re.clusterId)}getClusterLeaves(re){return this._geoJSONIndex.getClusterLeaves(re.clusterId,re.limit,re.offset)}}function ce(Ce,re){const se=v.e(re.geojsonVtOptions||{},{updateable:!0,clusterOptions:xe(re)});return new v.d0(Ce,se)}function xe({geojsonVtOptions:Ce,clusterProperties:re}){if(!re||!Ce.clusterOptions)return Ce.clusterOptions;const se={},ve={},Me={accumulated:null,zoom:0},qe={properties:null},$e=Object.keys(re);for(const De of $e){const[Ze,We]=re[De],Ae=v.c$(We),Pe=v.c$(typeof Ze=="string"?[Ze,["accumulated"],["get",De]]:Ze);se[De]=Ae.value,ve[De]=Pe.value}return Ce.clusterOptions.map=De=>{qe.properties=De;const Ze={};for(const We of $e)Ze[We]=se[We].evaluate(Me,qe);return Ze},Ce.clusterOptions.reduce=(De,Ze)=>{qe.properties=Ze;for(const We of $e)Me.accumulated=De[We],De[We]=ve[We].evaluate(Me,qe)},Ce.clusterOptions}class Re{constructor(re){this.self=re,this.actor=new v.N(re),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(se,ve)=>{if(this.externalWorkerSourceTypes[se])throw new Error(`Worker source with name "${se}" already registered.`);this.externalWorkerSourceTypes[se]=ve},this.self.addProtocol=v.cH,this.self.removeProtocol=v.cI,this.self.registerRTLTextPlugin=se=>{v.d1.setMethods(se)},this.self.makeRequest=v.m,this.actor.registerMessageHandler("LDT",(se,ve)=>this._getDEMWorkerSource(se,ve.source).loadTile(ve)),this.actor.registerMessageHandler("RDT",(se,ve)=>v._(this,void 0,void 0,function*(){this._getDEMWorkerSource(se,ve.source).removeTile(ve)})),this.actor.registerMessageHandler("GCEZ",(se,ve)=>v._(this,void 0,void 0,function*(){return this._getWorkerSource(se,ve.type,ve.source).getClusterExpansionZoom(ve)})),this.actor.registerMessageHandler("GCC",(se,ve)=>v._(this,void 0,void 0,function*(){return this._getWorkerSource(se,ve.type,ve.source).getClusterChildren(ve)})),this.actor.registerMessageHandler("GCL",(se,ve)=>v._(this,void 0,void 0,function*(){return this._getWorkerSource(se,ve.type,ve.source).getClusterLeaves(ve)})),this.actor.registerMessageHandler("LD",(se,ve)=>this._getWorkerSource(se,ve.type,ve.source).loadData(ve)),this.actor.registerMessageHandler("LT",(se,ve)=>this._getWorkerSource(se,ve.type,ve.source).loadTile(ve)),this.actor.registerMessageHandler("RT",(se,ve)=>this._getWorkerSource(se,ve.type,ve.source).reloadTile(ve)),this.actor.registerMessageHandler("AT",(se,ve)=>this._getWorkerSource(se,ve.type,ve.source).abortTile(ve)),this.actor.registerMessageHandler("RMT",(se,ve)=>this._getWorkerSource(se,ve.type,ve.source).removeTile(ve)),this.actor.registerMessageHandler("RS",(se,ve)=>v._(this,void 0,void 0,function*(){var Me,qe;if(!(!((qe=(Me=this.workerSources[se])===null||Me===void 0?void 0:Me[ve.type])===null||qe===void 0)&&qe[ve.source]))return;const $e=this.workerSources[se][ve.type][ve.source];delete this.workerSources[se][ve.type][ve.source],$e.removeSource!==void 0&&$e.removeSource(ve)})),this.actor.registerMessageHandler("RM",se=>v._(this,void 0,void 0,function*(){delete this.layerIndexes[se],delete this.availableImages[se],delete this.workerSources[se],delete this.demWorkerSources[se],this.globalStates.delete(se)})),this.actor.registerMessageHandler("SR",(se,ve)=>v._(this,void 0,void 0,function*(){this.referrer=ve})),this.actor.registerMessageHandler("SRPS",(se,ve)=>this._syncRTLPluginState(se,ve)),this.actor.registerMessageHandler("IS",(se,ve)=>v._(this,void 0,void 0,function*(){this.self.importScripts(ve)})),this.actor.registerMessageHandler("SI",(se,ve)=>this._setImages(se,ve)),this.actor.registerMessageHandler("UL",(se,ve)=>v._(this,void 0,void 0,function*(){this._getLayerIndex(se).update(ve.layers,ve.removedIds,this._getGlobalState(se))})),this.actor.registerMessageHandler("UGS",(se,ve)=>v._(this,void 0,void 0,function*(){const Me=this._getGlobalState(se);for(const qe in ve)Me[qe]=ve[qe]})),this.actor.registerMessageHandler("SL",(se,ve)=>v._(this,void 0,void 0,function*(){this._getLayerIndex(se).replace(ve,this._getGlobalState(se))}))}_getGlobalState(re){let se=this.globalStates.get(re);return se||(se={},this.globalStates.set(re,se)),se}
458_setImages(re,se){return v._(this,void 0,void 0,function*(){this.availableImages[re]=se;for(const ve in this.workerSources[re]){const Me=this.workerSources[re][ve];for(const qe in Me)Me[qe].availableImages=se}})}_syncRTLPluginState(re,se){return v._(this,void 0,void 0,function*(){return yield v.d1.syncState(se,this.self.importScripts)})}_getAvailableImages(re){let se=this.availableImages[re];return se||(se=[]),se}_getLayerIndex(re){let se=this.layerIndexes[re];return se||(se=this.layerIndexes[re]=new c),se}_getWorkerSource(re,se,ve){var Me,qe;if((Me=this.workerSources)[re]||(Me[re]={}),(qe=this.workerSources[re])[se]||(qe[se]={}),!this.workerSources[re][se][ve]){const $e={sendAsync:(De,Ze)=>(De.targetMapId=re,this.actor.sendAsync(De,Ze))};switch(se){case"vector":this.workerSources[re][se][ve]=new G($e,this._getLayerIndex(re),this._getAvailableImages(re));break;case"geojson":this.workerSources[re][se][ve]=new ue($e,this._getLayerIndex(re),this._getAvailableImages(re));break;default:this.workerSources[re][se][ve]=new this.externalWorkerSourceTypes[se]($e,this._getLayerIndex(re),this._getAvailableImages(re))}}return this.workerSources[re][se][ve]}_getDEMWorkerSource(re,se){var ve,Me;return(ve=this.demWorkerSources)[re]||(ve[re]={}),(Me=this.demWorkerSources[re])[se]||(Me[se]=new J),this.demWorkerSources[re][se]}}return v.i(self)&&(self.worker=new Re(self)),Re}),m("index",["exports","./shared"],function(v,c){var A="5.24.0";function L(){var _=new c.A(4);return c.A!=Float32Array&&(_[1]=0,_[2]=0),_[0]=1,_[3]=1,_}let z,j,V;const Z={frame(_,n,a,h){const f=h||window,b=f.requestAnimationFrame(C=>{E(),n(C)}),{unsubscribe:E}=c.s(_.signal,"abort",()=>{E(),f.cancelAnimationFrame(b),a(new c.a(_.signal.reason))},!1)},frameAsync(_,n){return new Promise((a,h)=>{this.frame(_,a,h,n)})},getImageData(_,n=0){return this.getImageCanvasContext(_).getImageData(-n,-n,_.width+2*n,_.height+2*n)},getImageCanvasContext(_){const n=window.document.createElement("canvas"),a=n.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("failed to create canvas 2d context");return n.width=_.width,n.height=_.height,a.drawImage(_,0,0,_.width,_.height),a},resolveURL:_=>(z||(z=document.createElement("a")),z.href=_,z.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return V!==void 0?V:!!matchMedia&&(j!=null||(j=matchMedia("(prefers-reduced-motion: reduce)")),j.matches)},set prefersReducedMotion(_){V=_}},K=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(_){this._frozenAt=_}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function Y(){return K.getCurrentTime()}var ie,Q;class G{static create(n,a,h){const f=window.document.createElement(n);return a!==void 0&&(f.className=a),h&&h.appendChild(f),f}static createNS(n,a){return window.document.createElementNS(n,a)}static disableDrag(){G.docStyle&&G.selectProp&&(G.userSelect=G.docStyle[G.selectProp],G.docStyle[G.selectProp]="none")}static enableDrag(){G.docStyle&&G.selectProp&&(G.docStyle[G.selectProp]=G.userSelect)}static suppressClickInternal(n){n.preventDefault(),n.stopPropagation(),window.removeEventListener("click",G.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",G.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",G.suppressClickInternal,!0)},0)}static getScale(n){const a=n.getBoundingClientRect();return{x:a.width/n.offsetWidth||1,y:a.height/n.offsetHeight||1,boundingClientRect:a}}static getPoint(n,a,h){const f=a.boundingClientRect;return new c.P((h.clientX-f.left)/a.x-n.clientLeft,(h.clientY-f.top)/a.y-n.clientTop)}static mousePos(n,a){const h=G.getScale(n);return G.getPoint(n,h,a)}static touchPos(n,a){const h=[],f=G.getScale(n);for(const b of a)h.push(G.getPoint(n,f,b));return h}static sanitize(n){const a=new DOMParser().parseFromString(n,"text/html").body||document.createElement("body"),h=a.querySelectorAll("script");for(const f of h)f.remove();return G.clean(a),a.innerHTML}static isPossiblyDangerous(n,a){const h=a.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(n)||!h.includes("javascript:")&&!h.includes("data:"))||!!n.startsWith("on")||void 0}static clean(n){const a=n.children;for(const h of a)G.removeAttributes(h),G.clean(h)}static removeAttributes(n){for(const{name:a,value:h}of n.attributes)G.isPossiblyDangerous(a,h)&&n.removeAttribute(a)}}G.docStyle=typeof window<"u"&&((ie=window.document)===null||ie===void 0?void 0:ie.documentElement.style),G.selectProp=!G.docStyle||"userSelect"in G.docStyle?"userSelect":"webkitUserSelect",function(_){let n,a,h,f;_.resetRequestQueue=()=>{n=[],a=0,h=0,f={}},_.addThrottleControl=k=>{const O=h++;return f[O]=k,O},_.removeThrottleControl=k=>{delete f[k],E()},_.getImage=(k,O,F=!0)=>new Promise((U,$)=>{k.headers||(k.headers={}),k.headers.accept="image/webp,*/*",c.e(k,{type:"image"}),n.push({abortController:O,requestParameters:k,supportImageRefresh:F,state:"queued",onError:H=>{$(H)},onSuccess:H=>{U(H)}}),E()});const b=k=>c._(this,void 0,void 0,function*(){k.state="running";const{requestParameters:O,supportImageRefresh:F,onError:U,onSuccess:$,abortController:H}=k,oe=F===!1&&!c.i(self)&&!c.g(O.url)&&(!O.headers||Object.keys(O.headers).reduce((pe,ge)=>pe&&ge==="accept",!0));a++;const de=oe?C(O,H):c.m(O,H);try{const pe=yield de;delete k.abortController,k.state="completed",pe.data instanceof HTMLImageElement||c.b(pe.data)?$(pe):pe.data&&$({data:yield(me=pe.data,typeof createImageBitmap=="function"?c.h(me):c.j(me)),cacheControl:pe.cacheControl,expires:pe.expires})}catch(pe){delete k.abortController,U(c.d(pe))}finally{a--,E()}var me}),E=()=>{const k=(()=>{for(const O of Object.keys(f))if(f[O]())return!0;return!1})()?c.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:c.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let O=a;O<k&&n.length>0;O++){const F=n.shift();F.abortController.signal.aborted?O--:b(F)}},C=(k,O)=>new Promise((F,U)=>
458{const $=new Image,H=k.url,oe=k.credentials;oe&&oe==="include"?$.crossOrigin="use-credentials":(oe&&oe==="same-origin"||!c.f(H))&&($.crossOrigin="anonymous"),O.signal.addEventListener("abort",()=>{$.src="",U(new c.a(O.signal.reason))}),$.fetchPriority="high",$.onload=()=>{$.onerror=$.onload=null,F({data:$})},$.onerror=()=>{$.onerror=$.onload=null,O.signal.aborted||U(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},$.src=H})}(Q||(Q={})),Q.resetRequestQueue();class J{constructor(n){this._transformRequestFn=n??null}transformRequest(n,a){return this._transformRequestFn&&this._transformRequestFn(n,a)||{url:n}}setTransformRequest(n){this._transformRequestFn=n}}function ue(_){const n=[];if(typeof _=="string")n.push({id:"default",url:_});else if(_&&_.length>0){const a=[];for(const{id:h,url:f}of _){const b=`${h}${f}`;a.includes(b)||(a.push(b),n.push({id:h,url:f}))}}return n}function ce(_,n,a){try{const h=new URL(_);return h.pathname+=`${n}${a}`,h.toString()}catch{throw new Error(`Invalid sprite URL "${_}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function xe(_){const{userImage:n}=_;return!(!(n!=null&&n.render)||!n.render()||(_.data.replace(new Uint8Array(n.data.buffer)),0))}class Re extends c.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new c.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(const n of Object.keys(this.images))this.removeImage(n);this.patterns={},this.atlasImage=new c.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(n){if(this.loaded!==n&&(this.loaded=n,n)){for(const{ids:a,promiseResolve:h}of this.requestors)h(this._getImagesForIds(a));this.requestors=[]}}getImage(n){const a=this.images[n];if(a&&!a.data&&a.spriteData){const h=a.spriteData;a.data=new c.R({width:h.width,height:h.height},h.context.getImageData(h.x,h.y,h.width,h.height).data),a.spriteData=null}return a}addImage(n,a){if(this.images[n])throw new Error(`Image id ${n} already exist, use updateImage instead`);this._validate(n,a)&&(this.images[n]=a)}_validate(n,a){let h=!0;const f=a.data||a.spriteData;return this._validateStretch(a.stretchX,f==null?void 0:f.width)||(this.fire(new c.l(new Error(`Image "${n}" has invalid "stretchX" value`))),h=!1),this._validateStretch(a.stretchY,f==null?void 0:f.height)||(this.fire(new c.l(new Error(`Image "${n}" has invalid "stretchY" value`))),h=!1),this._validateContent(a.content,a)||(this.fire(new c.l(new Error(`Image "${n}" has invalid "content" value`))),h=!1),h}_validateStretch(n,a){if(!n)return!0;let h=0;for(const f of n){if(f[0]<h||f[1]<f[0]||a<f[1])return!1;h=f[1]}return!0}_validateContent(n,a){if(!n)return!0;if(n.length!==4)return!1;const h=a.spriteData,f=(h==null?void 0:h.width)||a.data.width,b=(h==null?void 0:h.height)||a.data.height;return!(n[0]<0||f<n[0]||n[1]<0||b<n[1]||n[2]<0||f<n[2]||n[3]<0||b<n[3]||n[2]<n[0]||!(n[3]>=n[1]))}updateImage(n,a,h=!0){const f=this.getImage(n);if(h&&(f.data.width!==a.data.width||f.data.height!==a.data.height))throw new Error(`size mismatch between old image (${f.data.width}x${f.data.height}) and new image (${a.data.width}x${a.data.height}).`);a.version=f.version+1,this.images[n]=a,this.updatedImages[n]=!0}removeImage(n){var a;const h=this.images[n];delete this.images[n],delete this.patterns[n],!((a=h.userImage)===null||a===void 0)&&a.onRemove&&h.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(n){return new Promise((a,h)=>{let f=!0;if(!this.isLoaded())for(const b of n)this.images[b]||(f=!1);this.isLoaded()||f?a(this._getImagesForIds(n)):this.requestors.push({ids:n,promiseResolve:a})})}_getImagesForIds(n){var a;const h={};for(const f of n){let b=this.getImage(f);b||(this.fire(new c.n("styleimagemissing",{id:f})),b=this.getImage(f)),b?h[f]={data:b.data.clone(),pixelRatio:b.pixelRatio,sdf:b.sdf,version:b.version,stretchX:b.stretchX,stretchY:b.stretchY,content:b.content,textFitWidth:b.textFitWidth,textFitHeight:b.textFitHeight,hasRenderCallback:!!(!((a=b.userImage)===null||a===void 0)&&a.render)}:c.w(`Image "${f}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return h}getPixelSize(){const{width:n,height:a}=this.atlasImage;return{width:n,height:a}}getPattern(n){const a=this.patterns[n],h=this.getImage(n);if(!h)return null;if(a&&a.position.version===h.version)return a.position;if(a)a.position.version=h.version;else{const f={w:h.data.width+2,h:h.data.height+2,x:0,y:0},b=new c.I(f,h);this.patterns[n]={bin:f,position:b}}return this._updatePatternAtlas(),this.patterns[n].position}bind(n){const a=n.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new c.T(n,this.atlasImage,a.RGBA),this.atlasTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE)}_updatePatternAtlas(){const n=[];for(const b in this.patterns)n.push(this.patterns[b].bin);const{w:a,h}=c.p(n),f=this.atlasImage;f.resize({width:a||1,height:h||1});for(const b in this.patterns){const{bin:E}=this.patterns[b],C=E.x+1,k=E.y+1,O=this.getImage(b).data,F=O.width,U=O.height;c.R.copy(O,f,{x:0,y:0},{x:C,y:k},{width:F,height:U}),c.R.copy(O,f,{x:0,y:U-1},{x:C,y:k-1},{width:F,height:1}),c.R.copy(O,f,{x:0,y:0},{x:C,y:k+U},{width:F,height:1}),c.R.copy(O,f,{x:F-1,y:0},{x:C-1,y:k},{width:1,height:U}),c.R.copy(O,f,{x:0,y:0},{x:C+F,y:k},{width:1,height:U})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}
458dispatchRenderCallbacks(n){for(const a of n){if(this.callbackDispatchedThisFrame[a])continue;this.callbackDispatchedThisFrame[a]=!0;const h=this.getImage(a);h||c.w(`Image with ID: "${a}" was not found`),xe(h)&&this.updateImage(a,h)}}cloneImages(){const n={};for(const a in this.images){const h=this.images[a];n[a]=Object.assign(Object.assign({},h),{data:h.data?h.data.clone():null})}return n}}const Ce=1e20,re=new Float64Array(256);for(let _=0;_<256;_++){const n=.5-Math.pow(_/255,.45454545454545453);re[_]=n*Math.abs(n)}function se(_,n,a,h,f,b,E,C,k){for(let O=n;O<n+h;O++)ve(_,a*b+O,b,f,E,C,k);for(let O=a;O<a+f;O++)ve(_,O*b+n,1,h,E,C,k)}function ve(_,n,a,h,f,b,E){b[0]=0,E[0]=-Ce,E[1]=Ce,f[0]=_[n];for(let C=1,k=0,O=0;C<h;C++){f[C]=_[n+C*a];const F=C*C;do{const U=b[k];O=(f[C]-f[U]+F-U*U)/(C-U)/2}while(O<=E[k]&&--k>-1);k++,b[k]=C,E[k]=O,E[k+1]=Ce}for(let C=0,k=0;C<h;C++){for(;E[k+1]<C;)k++;const O=b[k],F=C-O;_[n+C*a]=f[O]+F*F}}re[255]=-Ce;const Me=c.v.layout_symbol["text-font"].default.join(",");class qe{constructor(n,a,h){this.requestManager=n,this.localIdeographFontFamily=a,this.entries={},this.lang=h}setURL(n){this.url=n}getGlyphs(n){return c._(this,void 0,void 0,function*(){const a=[];for(const b in n)for(const E of n[b])a.push(this._getAndCacheGlyphsPromise(b,E));const h=yield Promise.all(a),f={};for(const{stack:b,id:E,glyph:C}of h)f[b]||(f[b]={}),f[b][E]=C&&{id:C.id,bitmap:C.bitmap.clone(),metrics:C.metrics};return f})}_getAndCacheGlyphsPromise(n,a){return c._(this,void 0,void 0,function*(){var h,f;(h=(f=this.entries)[n])!==null&&h!==void 0||(f[n]={glyphs:{},requests:{},ranges:{}});const b=this.entries[n];let E=b.glyphs[a];return E!==void 0?{stack:n,id:a,glyph:E}:!this.url||this._charUsesLocalIdeographFontFamily(a)?(E=b.glyphs[a]=this._drawGlyph(b,n,a),{stack:n,id:a,glyph:E}):yield this._downloadAndCacheRangePromise(n,a)})}_downloadAndCacheRangePromise(n,a){return c._(this,void 0,void 0,function*(){var h;const f=this.entries[n],b=Math.floor(a/256);if(f.ranges[b])return{stack:n,id:a,glyph:null};(h=f.requests)[b]||(h[b]=qe.loadGlyphRange(n,b,this.url,this.requestManager));try{const E=yield f.requests[b];for(const C in E)f.glyphs[+C]=E[+C];return f.ranges[b]=!0,{stack:n,id:a,glyph:E[a]||null}}catch(E){const C=f.glyphs[a]=this._drawGlyph(f,n,a);return this._warnOnMissingGlyphRange(C,b,a,c.d(E)),{stack:n,id:a,glyph:C}}})}_warnOnMissingGlyphRange(n,a,h,f){const b=256*a,E=b+255,C=h.toString(16).padStart(4,"0").toUpperCase();c.w(`Unable to load glyph range ${a}, ${b}-${E}. Rendering codepoint U+${C} locally instead. ${f}`)}_charUsesLocalIdeographFontFamily(n){return!!this.localIdeographFontFamily&&c.r(n)}_drawGlyph(n,a,h){const f=a===Me&&this.localIdeographFontFamily!==""&&this._charUsesLocalIdeographFontFamily(h),b=f?"ideographTinySDF":"tinySDF";n[b]||(n[b]=this._createTinySDF(f?this.localIdeographFontFamily:a));const E=n[b].draw(String.fromCodePoint(h)),C=new RegExp("^\\p{gc=Cf}+$","u").test(String.fromCodePoint(h));return{id:h,bitmap:new c.t({width:E.width||60,height:E.height||60},E.data),metrics:{width:C?0:E.glyphWidth/2||24,height:E.glyphHeight/2||24,left:E.glyphLeft/2+.5||0,top:E.glyphTop/2-27.5||-8,advance:C?0:E.glyphAdvance/2||24,isDoubleResolution:!0}}}_createTinySDF(n){const a=n?n.split(","):[];a.push("sans-serif");const h=a.map(f=>/[-\w]+/.test(f)?f:`'${CSS.escape(f)}'`).join(",");return new qe.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:h,fontWeight:this._fontWeight(a[0]),fontStyle:this._fontStyle(a[
4580]),lang:this.lang})}_fontStyle(n){return/italic/i.test(n)?"italic":/oblique/i.test(n)?"oblique":"normal"}_fontWeight(n){const a={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950};let h;for(const[f,b]of Object.entries(a))new RegExp(`\\b${f}\\b`,"i").test(n)&&(h=`${b}`);return h}destroy(){for(const n in this.entries){const a=this.entries[n];a.tinySDF=null,a.ideographTinySDF=null,a.glyphs={},a.requests={},a.ranges={}}this.entries={}}}qe.loadGlyphRange=function(_,n,a,h){return c._(this,void 0,void 0,function*(){const f=256*n,b=f+255,E=yield h.transformRequest(a.replace("{fontstack}",_).replace("{range}",`${f}-${b}`),"Glyphs"),C=yield c.o(E,new AbortController);if(!(C!=null&&C.data))throw new Error(`Could not load glyph range. range: ${n}, ${f}-${b}`);const k={};for(const O of c.q(C.data))k[O.id]=O;return k})},qe.TinySDF=class{constructor({fontSize:_=24,buffer:n=3,radius:a=8,cutoff:h=.25,fontFamily:f="sans-serif",fontWeight:b="normal",fontStyle:E="normal",lang:C=null}={}){this.buffer=n,this.radius=a,this.cutoff=h,this.lang=C;const k=this.size=_+4*n,O=this._createCanvas(k),F=this.ctx=O.getContext("2d",{willReadFrequently:!0});F.font=`${E} ${b} ${_}px ${f}`,F.textBaseline="alphabetic",F.textAlign="left",F.fillStyle="black",this.gridOuter=new Float64Array(k*k),this.gridInner=new Float64Array(k*k),this.f=new Float64Array(k),this.z=new Float64Array(k+1),this.v=new Uint16Array(k)}_createCanvas(_){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(_,_);const n=document.createElement("canvas");return n.width=n.height=_,n}draw(_){const{width:n,actualBoundingBoxAscent:a,actualBoundingBoxDescent:h,actualBoundingBoxLeft:f,actualBoundingBoxRight:b}=this.ctx.measureText(_),E=Math.ceil(a),C=Math.floor(f),k=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(b)-C)),O=Math.max(0,Math.min(this.size-this.buffer,E+Math.ceil(h))),F=k+2*this.buffer,U=O+2*this.buffer,$=Math.max(F*U,0),H=new Uint8ClampedArray($),oe={data:H,width:F,height:U,glyphWidth:k,glyphHeight:O,glyphTop:E,glyphLeft:C,glyphAdvance:n};if(k===0||O===0)return oe;const{ctx:de,buffer:me,gridInner:pe,gridOuter:ge}=this;this.lang&&(de.lang=this.lang),de.clearRect(me,me,k,O),de.fillText(_,me-C,me+E);const we=de.getImageData(me,me,k,O);ge.fill(Ce,0,$),pe.fill(0,0,$);let ye=3;for(let _e=0;_e<O;_e++){let Ie=(_e+me)*F+me;for(let je=0;je<k;je++,ye+=4,Ie++){const Ne=we.data[ye];if(Ne===0)continue;const Xe=re[Ne];ge[Ie]=Math.max(0,Xe),pe[Ie]=Math.max(0,-Xe)}}se(ge,0,0,F,U,F,this.f,this.v,this.z),se(pe,me,me,k,O,F,this.f,this.v,this.z);const fe=255/this.radius,be=255*(1-this.cutoff);for(let _e=0;_e<$;_e++){const Ie=Math.sqrt(ge[_e])-Math.sqrt(pe[_e]);H[_e]=Math.round(be-fe*Ie)}return oe}};class $e{constructor(){this.specification=c.x.light.position}possiblyEvaluate(n,a){return c.G(n.expression.evaluate(a))}interpolate(n,a,h){return{x:c.H.number(n.x,a.x,h),y:c.H.number(n.y,a.y,h),z:c.H.number(n.z,a.z,h)}}}let De;class Ze extends c.E{constructor(n){super(),De||(De=new c.u({anchor:new c.D(c.x.light.anchor),position:new $e,color:new c.D(c.x.light.color),intensity:new c.D(c.x.light.intensity)})),this._transitionable=new c.y(De,void 0),this.setLight(n),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(n,a={}){if(!this._validate(c.z,n,a))for(const h in n){const f=n[h];h.endsWith(c.B)?this._transitionable.setTransition(h.slice(0,-c.B.length),f):this._transitionable.setValue(h,f)}}updateTransitions(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(n){this.properties=this._transitioning.possiblyEvaluate(n)}_validate(n,a,h){return(h==null?void 0:h.validate)!==!1&&c.C(this,n.call(c.F,{value:a,style:{glyphs:!0,sprite:!0},styleSpec:c.x}))}}const We=new c.u({"sky-color":new c.D(c.x.sky["sky-color"]),"horizon-color":new c.D(c.x.sky["horizon-color"]),"fog-color":new c.D(c.x.sky["fog-color"]),"fog-ground-blend":ne
458w c.D(c.x.sky["fog-ground-blend"]),"horizon-fog-blend":new c.D(c.x.sky["horizon-fog-blend"]),"sky-horizon-blend":new c.D(c.x.sky["sky-horizon-blend"]),"atmosphere-blend":new c.D(c.x.sky["atmosphere-blend"])});class Ae extends c.E{constructor(n){super(),this._transitionable=new c.y(We,void 0),this.setSky(n),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new c.J(0))}setSky(n,a={}){if(!this._validate(c.K,n,a)){n||(n={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const h in n){const f=n[h];h.endsWith(c.B)?this._transitionable.setTransition(h.slice(0,-c.B.length),f):this._transitionable.setValue(h,f)}}}getSky(){return this._transitionable.serialize()}updateTransitions(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(n){this.properties=this._transitioning.possiblyEvaluate(n)}_validate(n,a,h={}){return(h==null?void 0:h.validate)!==!1&&c.C(this,n.call(c.F,c.e({value:a,style:{glyphs:!0,sprite:!0},styleSpec:c.x})))}calculateFogBlendOpacity(n){return n<60?0:n<70?(n-60)/10:1}}class Pe{constructor(n,a){this.width=n,this.height=a,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(n,a){var h;const f=n.join(",")+String(a);
458return(h=this.dashEntry)[f]||(h[f]=this.addDash(n,a)),this.dashEntry[f]}getDashRanges(n,a,h){const f=[];let b=n.length%2==1?-n[n.length-1]*h:0,E=n[0]*h,C=!0;f.push({left:b,right:E,isDash:C,zeroLength:n[0]===0});let k=n[0];for(let O=1;O<n.length;O++){C=!C;const F=n[O];b=k*h,k+=F,E=k*h,f.push({left:b,right:E,isDash:C,zeroLength:F===0})}return f}addRoundDash(n,a,h){const f=a/2;for(let b=-h;b<=h;b++){const E=this.width*(this.nextRow+h+b);let C=0,k=n[C];for(let O=0;O<this.width;O++){O/k.right>1&&(k=n[++C]);const F=Math.abs(O-k.left),U=Math.abs(O-k.right),$=Math.min(F,U);let H;const oe=b/h*(f+1);if(k.isDash){const de=f-Math.abs(oe);H=Math.sqrt($*$+de*de)}else H=f-Math.sqrt($*$+oe*oe);this.data[E+O]=Math.max(0,Math.min(255,H+128))}}}addRegularDash(n){for(let C=n.length-1;C>=0;--C){const k=n[C],O=n[C+1];k.zeroLength?n.splice(C,1):O&&O.isDash===k.isDash&&(O.left=k.left,n.splice(C,1))}const a=n[0],h=n[n.length-1];a.isDash===h.isDash&&(a.left=h.left-this.width,h.right=a.right+this.width);const f=this.width*this.nextRow;let b=0,E=n[b];for(let C=0;C<this.width;C++){C/E.right>1&&(E=n[++b]);const k=Math.abs(C-E.left),O=Math.abs(C-E.right),F=Math.min(k,O);this.data[f+C]=Math.max(0,Math.min(255,(E.isDash?F:-F)+128))}}addDash(n,a){const h=a?7:0,f=2*h+1;if(this.nextRow+f>this.height)return c.w("LineAtlas out of space"),null;let b=0;for(const C of n)b+=C;if(b!==0){const C=this.width/b,k=this.getDashRanges(n,this.width,C);a?this.addRoundDash(k,C,h):this.addRegularDash(k)}const E={y:this.nextRow+h,height:2*h,width:b};return this.nextRow+=f,this.dirty=!0,E}bind(n){const a=n.gl;this.texture?(a.bindTexture(a.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,a.texSubImage2D(a.TEXTURE_2D,0,0,0,this.width,this.height,a.ALPHA,a.UNSIGNED_BYTE,this.data))):(this.texture=a.createTexture(),a.bindTexture(a.TEXTURE_2D,this.texture),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.REPEAT),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texImage2D(a.TEXTURE_2D,0,a.ALPHA,this.width,this.height,0,a.ALPHA,a.UNSIGNED_BYTE,this.data))}}const Ke="maplibre_preloaded_worker_pool";class ot{constructor(){this.active={}}acquire(n){if(!this.workers)for(this.workers=[];this.workers.length<ot.workerCount;)this.workers.push(new Worker(c.c.WORKER_URL));return this.active[n]=!0,this.workers.slice()}release(n){if(delete this.active[n],this.numActive()===0){for(const a of this.workers)a.terminate();this.workers=null}}isPreloaded(){return!!this.active[Ke]}numActive(){return Object.keys(this.active).length}}const ze=Math.floor(Z.hardwareConcurrency/2);let Je,mt;function ht(){return Je||(Je=new ot),Je}ot.workerCount=c.L(globalThis)?Math.max(Math.min(ze,3),1):1;class Ct{constructor(n,a){this.workerPool=n,this.actors=[],this.currentActor=0,this.id=a;const h=this.workerPool.acquire(a);for(let f=0;f<h.length;f++){const b=new c.N(h[f],a);b.name=`Worker ${f}`,this.actors.push(b)}if(!this.actors.length)throw new Error("No actors found")}broadcast(n,a){const h=[];for(const f of this.actors)h.push(f.sendAsync({type:n,data:a}));return Promise.all(h)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(n=!0){for(const a of this.actors)a.remove();this.actors=[],n&&this.workerPool.release(this.id)}registerMessageHandler(n,a){for(const h of this.actors)h.registerMessageHandler(n,a)}unregisterMessageHandler(n){for(const a of this.actors)a.unregisterMessageHandler(n)}}function Tt(){return mt||(mt=new Ct(ht(),c.M),mt.registerMessageHandler("GR",(_,n,a)=>c.m(n,a))),mt}function cr(_,n){const a=c.O();return c.Q(a,a,[1,1,0]),c.S(a,a,[.5*_.width,.5*_.height,1]),_.calculatePosMatrix?c.U(a,a,_.calculatePosMatrix(n.toUnwrapped())):a}function zt(_,n,a,h,f,b,E){var C;const k=function($,H,oe){if($)for(const de of $){const me=H[de];if((me==null?void 0:me.source)===oe&&me.type==="fill-extrusion")return!0}else for(const de in H){const me=H[de];if(me.source===oe&&me.type==="fill-extrusion")return!0}return!1}((C=f==null?void 0:f.layers)!==null&&C!==void 0?C:null,n,_.id),O=b.maxPitchScaleFactor(),F=_.tilesIn(h,O,k);F.sort(xn);const U=[];for(const $ of F)U.push({wrappedTileID:$.tileID.wrapped().key,queryResults:$.tile.queryRenderedFeatures(n,a,_.getState(),$.queryGeometry,$.cameraQueryGeometry,$.scale,f,b,O,cr(b,$.tileID),E?(H,oe)=>E($.tileID,H,oe):void 0)});return function($,H){for(const oe in $)for(const de of $[oe])Bi(de,H);return $}(function($){const H={},oe={};for(const{queryResults:de,wrappedTileID:me}of $){oe[me]||(oe[me]={});const pe=oe[me];for(const ge in de){const we=de[ge];pe[ge]||(pe[ge]={});const ye=pe[ge];H[ge]||(H[ge]=[]);for(const fe of we)ye[fe.featureIndex]||(ye[fe.featureIndex]=!0,H[ge].push(fe))}}return H}(U),_)}function xn(_,n){const a=_.tileID,h=n.tileID;return a.overscaledZ-h.overscaledZ||a.canonical.y-h.canonical.y||a.wrap-h.wrap||a.canonical.x-h.canonical.x}function Bi(_,n){const a=_.feature,h=n.getFeatureState(a.layer["source-layer"],a.id);a.source=a.layer.source,a.layer["source-layer"]&&(a.sourceLayer=a.layer["source-layer"]),a.state=h}function lo(_,n,a,h){return c._(this,void 0,void 0,function*(){let f=_;if(_.url?f=(yield c.k(yield n.transformRequest(_.url,"Source"),a)).data:yield Z.frameAsync(a,h),!f)return null;
458const b=c.V(c.e(f,_),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in f&&f.vector_layers&&(b.vectorLayerIds=f.vector_layers.map(E=>E.id)),b})}class bt{constructor(n,a){n&&(a?this.setSouthWest(n).setNorthEast(a):Array.isArray(n)&&(n.length===4?this.setSouthWest([n[0],n[1]]).setNorthEast([n[2],n[3]]):this.setSouthWest(n[0]).setNorthEast(n[1])))}setNorthEast(n){return this._ne=n instanceof c.W?new c.W(n.lng,n.lat):c.W.convert(n),this}setSouthWest(n){return this._sw=n instanceof c.W?new c.W(n.lng,n.lat):c.W.convert(n),this}extend(n){const a=this._sw,h=this._ne;let f,b;if(n instanceof c.W)f=n,b=n;else{if(!(n instanceof bt))return Array.isArray(n)?n.length===4||n.every(Array.isArray)?this.extend(bt.convert(n)):this.extend(c.W.convert(n)):n&&("lng"in n||"lon"in n)&&"lat"in n?this.extend(c.W.convert(n)):this;if(f=n._sw,b=n._ne,!f||!b)return this}return a||h?(a.lng=Math.min(f.lng,a.lng),a.lat=Math.min(f.lat,a.lat),h.lng=Math.max(b.lng,h.lng),h.lat=Math.max(b.lat,h.lat)):(this._sw=new c.W(f.lng,f.lat),this._ne=new c.W(b.lng,b.lat)),this}getCenter(){return new c.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new c.W(this.getWest(),this.getNorth())}getSouthEast(){return new c.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(n){const{lng:a,lat:h}=c.W.convert(n);let f=this._sw.lng<=a&&a<=this._ne.lng;return this._sw.lng>this._ne.lng&&(f=this._sw.lng>=a&&a>=this._ne.lng),this._sw.lat<=h&&h<=this._ne.lat&&f}intersects(n){if(!((n=bt.convert(n)).getNorth()>=this.getSouth()&&n.getSouth()<=this.getNorth()))return!1;const a=Math.abs(this.getEast()-this.getWest()),h=Math.abs(n.getEast()-n.getWest());if(a>=360||h>=360)return!0;const f=c.X(this.getWest(),-180,180),b=c.X(this.getEast(),-180,180),E=c.X(n.getWest(),-180,180),C=c.X(n.getEast(),-180,180),k=f>b,O=E>C;return!(!k||!O)||(k?C>=f||E<=b:O?b>=E||f<=C:E<=b&&C>=f)}static convert(n){return n instanceof bt?n:n&&new bt(n)}static fromLngLat(n,a=0){const h=360*a/40075017,f=h/Math.cos(Math.PI/180*n.lat);return new bt(new c.W(n.lng-f,n.lat-h),new c.W(n.lng+f,n.lat+h))}adjustAntiMeridian(){const n=new c.W(this._sw.lng,this._sw.lat),a=new c.W(this._ne.lng,this._ne.lat);return new bt(n,n.lng>a.lng?new c.W(a.lng+360,a.lat):a)}}class mr{constructor(n,a,h){this.bounds=bt.convert(this.validateBounds(n)),this.minzoom=a||0,this.maxzoom=h||24}validateBounds(n){return Array.isArray(n)&&n.length===4?[Math.max(-180,n[0]),Math.max(-90,n[1]),Math.min(180,n[2]),Math.min(90,n[3])]:[-180,-90,180,90]}contains(n){const a=Math.pow(2,n.z),h=Math.floor(c.Z(this.bounds.getWest())*a),f=Math.floor(c.Y(this.bounds.getNorth())*a),b=Math.ceil(c.Z(this.bounds.getEast())*a),E=Math.ceil(c.Y(this.bounds.getSouth())*a);return n.x>=h&&n.x<b&&n.y>=f&&n.y<E}}class Nr extends c.E{constructor(n,a,h,f){if(super(),this.id=n,this.dispatcher=h,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,c.e(this,c.V(a,["url","scheme","tileSize","promoteId","encoding"])),this._options=c.e({type:"vector"},a),this._collectResourceTiming=a.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(f)}load(){return c._(this,arguments,void 0,function*(n=!1){this._loaded=!1,this.fire(new c.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const a=yield lo(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,a&&(c.e(this,a),a.bounds&&(this.tileBounds=new mr(a.bounds,this.minzoom,this.maxzoom)),this.fire(new c.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new c.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:n})))}catch(a){this._tileJSONRequest=null,this._loaded=!0,c.$(a)||this.fire(new c.l(c.d(a)))}})}loaded(){return this._loaded}hasTile(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)}onAdd(n){this.map=n,this.load()}setSourceProperty(n){this._tileJSONRequest&&this._tileJSONRequest.abort(),n(),this.load(!0)}setTiles(n){return this.setSourceProperty(()=>{this._options.tiles=n}
458),this}setUrl(n){return this.setSourceProperty(()=>{this.url=n,this._options.url=n}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return c.e({},this._options)}loadTile(n){return c._(this,void 0,void 0,function*(){const a=n.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),h={request:yield this.map._requestManager.transformRequest(a,"Tile"),uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,tileSize:this.tileSize*n.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(n),etag:n.etag};h.request.collectResourceTiming=this._collectResourceTiming;let f="RT";if(n.actor&&n.state!=="expired"){if(n.state==="loading")return new Promise((b,E)=>{n.reloadPromise={resolve:b,reject:E}})}else n.actor=this.dispatcher.getActor(),f="LT";n.abortController=new AbortController;try{const b=yield n.actor.sendAsync({type:f,data:h},n.abortController);if(delete n.abortController,n.aborted)return;this._afterTileLoadWorkerResponse(n,b);const E={};return b!=null&&b.etagUnmodified&&(E.unmodified=!0),E}catch(b){if(delete n.abortController,n.aborted)return;if(b&&b.status!==404)throw b;this._afterTileLoadWorkerResponse(n,null)}})}_getOverzoomParameters(n){return c._(this,void 0,void 0,function*(){if(n.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;const a=n.tileID.scaledTo(this.maxzoom).canonical,h=a.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:a,overzoomRequest:yield this.map._requestManager.transformRequest(h,"Tile")}})}_afterTileLoadWorkerResponse(n,a){if(a!=null&&a.resourceTiming&&(n.resourceTiming=a.resourceTiming),a&&this.map._refreshExpiredTiles&&n.setExpiryData(a),n.etag=a==null?void 0:a.etag,n.loadVectorData(a,this.map.painter),n.reloadPromise){const h=n.reloadPromise;n.reloadPromise=null,this.loadTile(n).then(h.resolve).catch(h.reject)}}abortTile(n){return c._(this,void 0,void 0,function*(){n.abortController&&(n.abortController.abort(),delete n.abortController),n.actor&&(yield n.actor.sendAsync({type:"AT",data:{uid:n.uid,type:this.t
458ype,source:this.id}}))})}unloadTile(n){return c._(this,void 0,void 0,function*(){n.unloadVectorData(),n.actor&&(yield n.actor.sendAsync({type:"RMT",data:{uid:n.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Ln extends c.E{constructor(n,a,h,f){super(),this.id=n,this.dispatcher=h,this.setEventedParent(f),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=c.e({type:"raster"},a),c.e(this,c.V(a,["url","scheme","tileSize"]))}load(){return c._(this,arguments,void 0,function*(n=!1){this._loaded=!1,this.fire(new c.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const a=yield lo(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,a&&(c.e(this,a),a.bounds&&(this.tileBounds=new mr(a.bounds,this.minzoom,this.maxzoom)),this.fire(new c.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new c.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:n})))}catch(a){this._tileJSONRequest=null,this._loaded=!0,c.$(a)||this.fire(new c.l(c.d(a)))}})}loaded(){return this._loaded}onAdd(n){this.map=n,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(n){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),n(),this.load(!0)}setTiles(n){return this.setSourceProperty(()=>{this._options.tiles=n}),this}setUrl(n){return this.setSourceProperty(()=>{this.url=n,this._options.url=n}),this}serialize(){return c.e({},this._options)}hasTile(n){return!this.tileBounds||this.tileBounds.contains(n.canonical)}loadTile(n){return c._(this,void 0,void 0,function*(){const a=n.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);n.abortController=new AbortController;try{const h=yield Q.getImage(yield this.map._requestManager.transformRequest(a,"Tile"),n.abortController,this.map._refreshExpiredTiles);if(delete n.abortController,n.aborted)return void(n.state="unloaded");if(h!=null&&h.data){this.map._refreshExpiredTiles&&(h.cacheControl||h.expires)&&n.setExpiryData({cacheControl:h.cacheControl,expires:h.expires});const f=this.map.painter.context,b=f.gl,E=h.data;n.texture=this.map.painter.getTileTexture(E.width),n.texture?n.texture.update(E,{useMipmap:!0}):(n.texture=new c.T(f,E,b.RGBA,{useMipmap:!0}),n.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST)),n.state="loaded"}}catch(h){if(delete n.abortController,n.aborted)n.state="unloaded";else if(h)throw n.state="errored",h}})}abortTile(n){return c._(this,void 0,void 0,function*(){n.abortController&&(n.abortController.abort(),delete n.abortController)})}unloadTile(n){return c._(this,void 0,void 0,function*(){n.texture&&this.map.painter.saveTileTexture(n.texture)})}hasTransition(){return!1}}class Wr extends Ln{constructor(n,a,h,f){super(n,a,h,f),this.type="raster-dem",this.maxzoom=22,this._options=c.e({type:"raster-dem"},a),this.encoding=a.encoding||"mapbox",this.redFactor=a.redFactor,this.greenFactor=a.greenFactor,this.blueFactor=a.blueFactor,this.baseShift=a.baseShift}loadTile(n){return c._(this,void 0,void 0,function*(){const a=n.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),h=yield this.map._requestManager.transformRequest(a,"Tile");n.neighboringTiles=this._getNeighboringTiles(n.tileID),n.abortController=new AbortController;try{const f=yield Q.getImage(h,n.abortController,this.map._refreshExpiredTiles);if(delete n.abortController,n.aborted)return void(n.state="unloaded");if(f!=null&&f.data){const b=f.data;this.map._refreshExpiredTiles&&(f.cacheControl||f.expires)&&n.setExpiryData({cacheControl:f.cacheControl,expires:f.expires});const E=c.b(b)&&c.a0()?b:yield this.readImageNow(b),C={type:this.type,uid:n.uid,source:this.id,rawImageData:E,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(n.actor&&n.state!=="expired"&&n.state!=="reloading")return;n.actor&&n.state!=="expired"||(n.actor=this.dispatcher.getActor()),n.dem=yield n.actor.sendAsync({type:"LDT",data:C}
458),n.needsHillshadePrepare=!0,n.needsTerrainPrepare=!0,n.state="loaded"}}catch(f){if(delete n.abortController,n.aborted)n.state="unloaded";else if(f)throw n.state="errored",f}})}readImageNow(n){return c._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&c.a1()){const a=n.width+2,h=n.height+2;try{return new c.R({width:a,height:h},yield c.a2(n,-1,-1,a,h))}catch{}}return Z.getImageData(n,1)})}_getNeighboringTiles(n){const a=n.canonical,h=Math.pow(2,a.z),f=(a.x-1+h)%h,b=a.x===0?n.wrap-1:n.wrap,E=(a.x+1+h)%h,C=a.x+1===h?n.wrap+1:n.wrap,k={};return k[new c.a3(n.overscaledZ,b,a.z,f,a.y).key]={backfilled:!1},k[new c.a3(n.overscaledZ,C,a.z,E,a.y).key]={backfilled:!1},a.y>0&&(k[new c.a3(n.overscaledZ,b,a.z,f,a.y-1).key]={backfilled:!1},k[new c.a3(n.overscaledZ,n.wrap,a.z,a.x,a.y-1).key]={backfilled:!1},k[new c.a3(n.overscaledZ,C,a.z,E,a.y-1).key]={backfilled:!1}),a.y+1<h&&(k[new c.a3(n.overscaledZ,b,a.z,f,a.y+1).key]={backfilled:!1},k[new c.a3(n.overscaledZ,n.wrap,a.z,a.x,a.y+1).key]={backfilled:!1},k[new c.a3(n.overscaledZ,C,a.z,E,a.y+1).key]={backfilled:!1}),k}unloadTile(n){return c._(this,void 0,void 0,function*(){n.demTexture&&this.map.painter.saveTileTexture(n.demTexture),n.fbo&&(n.fbo.destroy(),delete n.fbo),n.dem&&delete n.dem,delete n.neighboringTiles,n.state="unloaded",n.actor&&(yield n.actor.sendAsync({type:"RDT",data:{type:this.type,uid:n.uid,source:this.id}}))})}}function bn(_,n){return n?_.properties[n]:_.id}function Io(_,n){const a={id:_.id};if(n.removeAllProperties&&(delete _.removeProperties,delete _.addOrUpdateProperties,delete n.removeProperties),n.removeProperties)for(const h of n.removeProperties){const f=_.addOrUpdateProperties.findIndex(b=>b.key===h);f>-1&&_.addOrUpdateProperties.splice(f,1)}return(_.removeAllProperties||n.removeAllProperties)&&(a.removeAllProperties=!0),(_.removeProperties||n.removeProperties)&&(a.removeProperties=[..._.removeProperties||[],...n.removeProperties||[]]),(_.addOrUpdateProperties||n.addOrUpdateProperties)&&(a.addOrUpdateProperties=[..._.addOrUpdateProperties||[],...n.addOrUpdateProperties||[]]),(_.newGeometry||n.newGeometry)&&(a.newGeometry=n.newGeometry||_.newGeometry),a}function rs(_){var n,a;if(!_)return{};const h={};return h.removeAll=_.removeAll,h.remove=new Set(_.remove||[]),h.add=new Map((n=_.add)===null||n===void 0?void 0:n.map(f=>[f.id,f])),h.update=new Map((a=_.update)===null||a===void 0?void 0:a.map(f=>[f.id,f])),h}function bp(_){return _&&_.length!==0?typeof _[0]=="number"?[_]:_.flatMap(n=>bp(n)):[]}function ns(_){return _.type==="GeometryCollection"?_.geometries.flatMap(n=>ns(n)):bp(_.coordinates)}function Ba(_){const n=new bt;let a;switch(_.type){case"FeatureCollection":a=_.features.flatMap(h=>ns(h.geometry));break;case"Feature":a=ns(_.geometry);break;default:a=ns(_)}if(a.length===0)return n;for(const h of a){const[f,b]=h;n.extend([f,b])}return n}class Bu extends c.E{constructor(n,a,h,f){super(),this.id=n,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:a.data},this.actor=h.getActor(),this.setEventedParent(f),this._data=typeof a.data=="string"?{url:a.data}:{geojson:a.data},this._options=c.e({},a),this._collectResourceTiming=a.collectResourceTiming,a.maxzoom!==void 0&&(this.maxzoom=a.maxzoom),a.type&&(this.type=a.type),a.attribution&&(this.attribution=a.attribution),this.promoteId=a.promoteId,a.clusterMaxZoom!==void 0&&this.maxzoom<=a.clusterMaxZoom&&c.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${a.clusterMaxZoom}".`),this.workerOptions=c.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(a.buffer!==void 0?a.buffer:128),tolerance:this._pixelsToTileUnits(a.tolerance!==void 0?a.tolerance:.375),extent:c.a6,maxZoom:this.maxzoom,lineMetrics:a.lineMetrics||!1,generateId:a.generateId||!1,promoteId:typeof a.promoteId=="string"?a.promoteId:void 0,cluster:a.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(a.clusterMaxZoom),minPoints:Math.max(2,a.clusterMinPoints||2),extent:c.a6,radius:this._pixelsToTileUnits(a.clusterRadius||50),log:!1,generateId:a.generateId||!1}},clusterProperties:a.clusterProperties,filter:a.filter},a.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(n){return n*(c.a6/this.tileSize)}
458_getClusterMaxZoom(n){const a=n?Math.round(n):this.maxzoom-1;return Number.isInteger(n)||n===void 0||c.w(`Integer expected for option 'clusterMaxZoom': provided value "${n}" rounded to "${a}"`),a}load(){return c._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(n){this.map=n,this.load()}setData(n,a){this._data=typeof n=="string"?{url:n}:{geojson:n},this._pendingWorkerUpdate={data:n};const h=this._updateWorkerData();return a?h:this}updateData(n,a){this._pendingWorkerUpdate.diff=function(f,b){if(!f)return b||{};if(!b)return f||{};const E=rs(f),C=rs(b);(function(O,F){F.removeAll&&(O.add.clear(),O.update.clear(),O.remove.clear(),F.remove.clear());for(const U of F.remove)O.add.delete(U),O.update.delete(U);for(const[U,$]of F.update){const H=O.update.get(U);H&&(F.update.set(U,Io(H,$)),O.update.delete(U))}})(E,C);const k={};if((E.removeAll||C.removeAll)&&(k.removeAll=!0),k.remove=new Set([...E.remove,...C.remove]),k.add=new Map([...E.add,...C.add]),k.update=new Map([...E.update,...C.update]),k.remove.size&&k.add.size)for(const O of k.add.keys())k.remove.delete(O);return function(O){const F={};return O.removeAll&&(F.removeAll=O.removeAll),O.remove&&(F.remove=Array.from(O.remove)),O.add&&(F.add=Array.from(O.add.values())),O.update&&(F.update=Array.from(O.update.values())
458),F}(k)}(this._pendingWorkerUpdate.diff,n);const h=this._updateWorkerData();return a?h:this}getData(){return c._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return c._(this,void 0,void 0,function*(){return Ba(yield this.getData())})}setClusterOptions(n){return this.workerOptions.geojsonVtOptions.cluster=n.cluster,n.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(n.clusterRadius)),n.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(n.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(n){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:n,source:this.id}})}getClusterChildren(n){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:n,source:this.id}})}getClusterLeaves(n,a,h){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:n,limit:a,offset:h}})}_updateWorkerData(){return c._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void c.w(`No pending worker updates for GeoJSONSource ${this.id}.`);const{data:n,diff:a,updateCluster:h}=this._pendingWorkerUpdate,f=this._getLoadGeoJSONParameters(n,a,h);n!==void 0?this._pendingWorkerUpdate.data=void 0:a?this._pendingWorkerUpdate.diff=void 0:h&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(f)})}_getLoadGeoJSONParameters(n,a,h){return c._(this,void 0,void 0,function*(){const f=c.e({type:this.type},this.workerOptions);return typeof n=="string"?(f.request=yield this.map._requestManager.transformRequest(Z.resolveURL(n),"Source"),f.request.collectResourceTiming=this._collectResourceTiming,f):n!==void 0?(f.data=n,f):a?(f.dataDiff=a,f):h?(f.updateCluster=!0,f):void 0})}_dispatchWorkerUpdate(n){return c._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new c.n("dataloading",{dataType:"source"}));try{const a=yield n,h=yield this.actor.sendAsync({type:"LD",data:a});if(this._isUpdatingWorker=!1,this._removed||h.abandoned)return void this.fire(new c.n("dataabort",{dataType:"source"}));h.data&&(this._data={geojson:h.data});const f=this._applyDiffToSource(a.dataDiff),b=this._getShouldReloadTileOptions(f),E={dataType:"source"};this._applyResourceTiming(E,h),this.fire(new c.n("data",Object.assign(Object.assign({},E),{sourceDataType:"metadata"}))),this.fire(new c.n("data",Object.assign(Object.assign({},E),{sourceDataType:"content",shouldReloadTileOptions:b})))}catch(a){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new c.n("dataabort",{dataType:"source"}));this.fire(new c.l(c.d(a)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(n,a){var h;if(!this._collectResourceTiming)return;const f=(h=a.resourceTiming)===null||h===void 0?void 0:h[this.id];if(!f)return;const b=f.slice(0);b!=null&&b.length&&c.e(n,{resourceTiming:b})}_applyDiffToSource(n){if(!n)return;const a=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){const f=function(b,E){const C=new Map;if(b==null||b.type==null)return C;if(b.type==="Feature"){const k=bn(b,E);return k==null?void 0:(C.set(k,b),C)}if(b.type==="FeatureCollection"){const k=new Set;for(const O of b.features){const F=bn(O,E);if(F==null||k.has(F))return;k.add(F),C.set(F,O)}return C}}(this._data.geojson,a);if(!f)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:f}}if(!this._data.updateable)return;const h=function(f,b,E){var C,k;const O=[];if(b.removeAll)f.clear();else if(b.remove)for(const F of b.remove){const U=f.get(F);U&&(O.push(U.geometry),f.delete(F))}if(b.add)for(const F of b.add){const U=bn(F,E);if(U==null)continue;const $=f.get(U);$&&O.push($.geometry),O.push(F.geometry),f.set(U,F)}if(b.update)for(const F of b.update){const U=f.get(F.id);if(!U)continue;const $=!!F.newGeometry,H=F.removeAllProperties||((C=F.removeProperties)===null||C===void 0?void 0:C.length)>0||((k=F.addOrUpdateProperties)===null||k===void 0?void 0:k.length)>0;if(!$&&!H)continue;O.push(U.geometry);const oe=Object.assign({},U);if(f.set(F.id,oe),$&&(O.push(F.newGeometry),oe.geometry=F.newGeometry),H){if(oe.properties=F.removeAllProperties?{}:Object.assign({},oe.properties||{}),F.removeProperties)for(const de of F.removeProperties)delete oe.properties[de];if(F.addOrUpdateProperties)for(const{key:de,value:me}of F.addOrUpdateProperties)oe.properties[de]=me}}return O}(this._data.updateable,n,a);return n.removeAll||this._options.cluster?void 0:h}_getShouldReloadTileOptions(n){if(n)return{affectedBounds:n.filter(
458Boolean).map(a=>Ba(a))}}shouldReloadTile(n,{affectedBounds:a}){if(n.state==="loading")return!0;if(n.state==="unloaded")return!1;const{buffer:h,extent:f}=this.workerOptions.geojsonVtOptions,b=function({x:E,y:C,z:k},O=0){const F=c.a4((E-O)/Math.pow(2,k)),U=c.a5((C+1+O)/Math.pow(2,k)),$=c.a4((E+1+O)/Math.pow(2,k)),H=c.a5((C-O)/Math.pow(2,k));return new bt([F,U],[$,H])}(n.tileID.canonical,h/f);for(const E of a)if(b.intersects(E))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(n){return c._(this,void 0,void 0,function*(){const a=n.actor?"RT":"LT";n.actor=this.actor;const h={type:this.type,uid:n.uid,tileID:n.tileID,zoom:n.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};n.abortController=new AbortController;const f=yield this.actor.sendAsync({type:a,data:h},n.abortController);delete n.abortController,n.unloadVectorData(),n.aborted||n.loadVectorData(f,this.map.painter,a==="RT")})}abortTile(n){return c._(this,void 0,void 0,function*(){n.abortController&&(n.abortController.abort(),delete n.abortController),n.aborted=!0})}unloadTile(n){return c._(this,void 0,void 0,function*(){n.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:n.uid,type:this.t
458ype,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return c.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class is extends c.E{constructor(n,a,h,f){super(),this.flippedWindingOrder=!1,this.id=n,this.dispatcher=h,this.coordinates=a.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(f),this.options=a}load(n){return c._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new c.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const a=yield Q.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,a!=null&&a.data&&(this.image=a.data,n&&(this.coordinates=n),this._finishLoading())}catch(a){this._request=null,this._loaded=!0,c.$(a)||this.fire(new c.l(c.d(a)))}})}loaded(){return this._loaded}updateImage(n){return n.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=n.url,this.load(n.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new c.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(n){this.map=n,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(n){this.coordinates=n;const a=n.map(c.a7.fromLngLat);var h;return this.tileID=function(f){const b=c.a8.fromPoints(f),E=b.width(),C=b.height(),k=Math.max(E,C),O=Math.max(0,Math.floor(-Math.log(k)/Math.LN2)),F=Math.pow(2,O);return new c.aa(O,Math.floor((b.minX+b.maxX)/2*F),Math.floor((b.minY+b.maxY)/2*F))}(a),this.terrainTileRanges=this._getOverlappingTileRanges(a),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=a.map(f=>this.tileID.getTilePoint(f)._round()),this.flippedWindingOrder=((h=this.tileCoords)[1].x-h[0].x)*(h[2].y-h[0].y)-(h[1].y-h[0].y)*(h[2].x-h[0].x)<0,this.fire(new c.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const n=this.map.painter.context,a=n.gl;this.texture||(this.texture=new c.T(n,this.image,a.RGBA),this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE));let h=!1;for(const f in this.tiles){const b=this.tiles[f];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,h=!0)}h&&this.fire(new c.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(n){return c._(this,void 0,void 0,function*(){var a;!((a=this.tileID)===null||a===void 0)&&a.equals(n.tileID.canonical)?(this.tiles[String(n.tileID.wrap)]=n,n.buckets={}):n.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(n){const{minX:a,minY:h,maxX:f,maxY:b}=c.a8.fromPoints(n),E={};for(let C=0;C<=c.a9;C++){const k=Math.pow(2,C),O=Math.floor(a*k),F=Math.floor(h*k),U=Math.floor(f*k),$=Math.floor(b*k),H=(O%k+k)%k,oe=U%k,de=Math.floor(O/k),me=Math.floor(U/k);E[C]={minWrap:de,maxWrap:me,minTileXWrapped:H,maxTileXWrapped:oe,minTileY:F,maxTileY:$}}return E}}class js extends is{constructor(n,a,h,f){super(n,a,h,f),this._onPlayingHandler=()=>{var b;(b=this.map)===null||b===void 0||b.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=a}load(){return c._(this,void 0,void 0,function*(){this._loaded=!1;const n=this.options;this.urls=[];for(const a of n.urls)this.urls.push((yield this.map._requestManager.transformRequest(a,"Source")).url);try{const a=yield c.ab(this.urls);if(this._loaded=!0,!a)return;this.video=a,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(a){this.fire(new c.l(c.d(a)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(n){if(this.video){const a=this.video.seekable;n<a.start(0)||n>a.end(0)?this.fire(new c.l(new c.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${a.start(0)} and ${a.end(0)}-second mark.`))):this.video.currentTime=n}}getVideo(){return this.video}
458onAdd(n){this.map||(this.map=n,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const n=this.map.painter.context,a=n.gl;this.texture?this.video.paused||(this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE),a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,this.video)):(this.texture=new c.T(n,this.video,a.RGBA),this.texture.bind(a.LINEAR,a.CLAMP_TO_EDGE));let h=!1;for(const f in this.tiles){const b=this.tiles[f];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,h=!0)}h&&this.fire(new c.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class wp extends is{constructor(n,a,h,f){super(n,a,h,f),a.coordinates?Array.isArray(a.coordinates)&&a.coordinates.length===4&&!a.coordinates.some(b=>!Array.isArray(b)||b.length!==2||b.some(E=>typeof E!="number"))||this.fire(new c.l(new c.ac(`sources.${n}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new c.l(new c.ac(`sources.${n}`,null,'missing required property "coordinates"'))),a.animate&&typeof a.animate!="boolean"&&this.fire(new c.l(new c.ac(`sources.${n}`,null,'optional "animate" property must be a boolean value'))),a.canvas?typeof a.canvas=="string"||a.canvas instanceof HTMLCanvasElement||this.fire(new c.l(new c.ac(`sources.${n}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new c.l(new c.ac(`sources.${n}`,null,'missing required property "canvas"'))),this.options=a,this.animate=a.animate===void 0||a.animate}load(){return c._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new c.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(n){this.map=n,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let n=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,n=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,n=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const a=this.map.painter.context,h=a.gl;this.texture?(n||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new c.T(a,this.canvas,h.RGBA,{premultiply:!0}),this.texture.bind(h.LINEAR,h.CLAMP_TO_EDGE));let f=!1;for(const b in this.tiles){const E=this.tiles[b];E.state!=="loaded"&&(E.state="loaded",E.texture=this.texture,f=!0)}f&&this.fire(new c.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const n of[this.canvas.width,this.canvas.height])if(isNaN(n)||n<=0)return!0;return!1}}const Sp={},Vu=_=>{switch(_){case"geojson":return Bu;case"image":return is;case"raster":return Ln;case"raster-dem":return Wr;case"vector":return Nr;case"video":return js;case"canvas":return wp}return Sp[_]},fc="RTLPluginLoaded";class Sg extends c.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Tt()}_syncState(n){return this.status=n,this.dispatcher.broadcast("SRPS",{pluginStatus:n,pluginURL:this.url}).catch(a=>{throw this.status="error",a})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(n){return c._(this,arguments,void 0,function*(a,h=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=Z.resolveURL(a),!this.url)throw new Error(`requested url ${a}
458 is invalid`);if(this.status==="unavailable"){if(!h)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return c._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new c.n(fc))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Uu=null;function os(){return Uu||(Uu=new Sg),Uu}var Mo,wi;(function(_){_[_.Base=0]="Base",_[_.Parent=1]="Parent"})(Mo||(Mo={})),function(_){_[_.Departing=0]="Departing",_[_.Incoming=1]="Incoming"}(wi||(wi={}));class Va{constructor(n,a){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=n,this.uid=c.ad(),this.uses=0,this.tileSize=a,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(n){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(n||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:n,fadingDirection:a,fadingParentID:h,fadeEndTime:f}){this.resetFadeLogic(),this.fadingRole=n,this.fadingDirection=a,this.fadingParentID=h,this.fadeEndTime=f}setSelfFadeLogic(n){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=n}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=Y(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(n){this.demTexture&&n.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(n,a,h){if((n==null?void 0:n.etagUnmodified)!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",n){n.featureIndex&&(this.latestFeatureIndex=n.featureIndex,n.rawTileData?(this.latestRawTileData=n.rawTileData,this.latestEncoding=n.encoding,this.latestFeatureIndex.rawTileData=n.rawTileData,this.latestFeatureIndex.encoding=n.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=n.collisionBoxArray,this.buckets=function(f,b){const E={};if(!b)return E;for(const C of f){const k=C.layerIds.map(O=>b.getLayer(O)).filter(Boolean);if(k.length!==0){C.layers=k,C.stateDependentLayerIds&&(C.stateDependentLayers=C.stateDependentLayerIds.map(O=>k.filter(F=>F.id===O)[0]));for(const O of k)E[O.id]=C}}return E}(n.buckets,a==null?void 0:a.style),this.hasSymbolBuckets=!1;for(const f in this.buckets){const b=this.buckets[f];if(b instanceof c.af){if(this.hasSymbolBuckets=!0,!h)break;b.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const f in this.buckets){const b=this.buckets[f];if(b instanceof c.af&&b.hasRTLText){this.hasRTLText=!0,os().lazyLoad();break}}this.queryPadding=0;for(const f in this.buckets){const b=this.buckets[f];this.queryPadding=Math.max(this.queryPadding,a.style.getLayer(f).queryRadius(b))}n.imageAtlas&&(this.imageAtlas=n.imageAtlas),n.glyphAtlasImage&&(this.glyphAtlasImage=n.glyphAtlasImage),this.dashPositions=n.dashPositions}else this.collisionBoxArray=new c.ae;else this.state="loaded"}unloadVectorData(){for(const n in this.buckets)this.buckets[n].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(n){return this.buckets[n.id]}upload(n){for(const h in this.buckets){const f=this.buckets[h];f.uploadPending()&&f.upload(n)}const a=n.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new c.T(n,this.imageAtlas.image,a.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new c.T(n,this.glyphAtlasImage,a.ALPHA),this.glyphAtlasImage=null)}prepare(n){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(n,this.imageAtlasTexture)}queryRenderedFeatures(n,a,h,f,b,E,C,k,O,F,U){var $;return!(($=this.latestFeatureIndex)===null||$===void 0)&&$.rawTileData?this.latestFeatureIndex.query({queryGeometry:f,cameraQueryGeometry:b,scale:E,tileSize:this.tileSize,pixelPosMatrix:F,transform:k,params:C,queryPadding:this.queryPadding*O,getElevation:U},n,a,h):{}}querySourceFeatures(n,a){const h=this.latestFeatureIndex;if(!(h!=null&&h.rawTileData))return;const f=h.loadVTLayers(),b=a!=null&&a.sourceLayer?a.sourceLayer:"",E=f[c.ag]||f[b];if(!E)return;const C=c.ah(a==null?void 0:a.filter,a==null?void 0:a.globalState),{z:k,x:O,y:F}=this.tileID.canonical,U={z:k,x:O,y:F};for(let $=0;$<E.length;$++){const H=E.feature($);if(C.needGeometry){const me=c.ai(H,!0);
458if(!C.filter(new c.J(this.tileID.overscaledZ),me,this.tileID.canonical))continue}else if(!C.filter(new c.J(this.tileID.overscaledZ),H))continue;const oe=h.getId(H,b),de=new c.aj(H,k,O,F,oe);de.tile=U,n.push(de)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(n){const a=this.expirationTime;if(n.cacheControl){const h=c.ak(n.cacheControl);h["max-age"]&&(this.expirationTime=Date.now()+1e3*h["max-age"])}else n.expires&&(this.expirationTime=new Date(n.expires).getTime());if(this.expirationTime){const h=Date.now();let f=!1;if(this.expirationTime>h)f=!1;else if(a)if(this.expirationTime<a)f=!0;else{const b=this.expirationTime-a;b?this.expirationTime=h+Math.max(b,3e4):f=!0}else f=!0;f?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(n,a){var h,f,b;if(!(!((h=this.latestFeatureIndex)===null||h===void 0)&&h.rawTileData)||Object.keys(n).length===0)return;const E=this.latestFeatureIndex.loadVTLayers();for(const C in this.buckets){if(!a.style.hasLayer(C))continue;const k=this.buckets[C],O=k.layers[0].sourceLayer||c.ag,F=E[O],U=n[O];if(!F||!U||Object.keys(U).length===0)continue;k.update(U,F,((f=this.imageAtlas)===null||f===void 0?void 0:f.patternPositions)||{},this.dashPositions||{});const $=(b=a==null?void 0:a.style)===null||b===void 0?void 0:b.getLayer(C);$&&(this.queryPadding=Math.max(this.queryPadding,$.queryRadius(k)))}}holdingForSymbolFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Y()}clearSymbolFadeHold(){this.symbolFadeHoldUntil=void 0}setSymbolHoldDuration(n){this.symbolFadeHoldUntil=Y()+n}
458setDependencies(n,a){const h={};for(const f of a)h[f]=!0;this.dependencies[n]=h}hasDependency(n,a){for(const h of n){const f=this.dependencies[h];if(f){for(const b of a)if(f[b])return!0}}return!1}}class Tp{constructor(){this.state={},this.stateChanges={},this.deletedStates={},this.revision=0}updateState(n,a,h){var f,b,E,C,k;const O=String(a);if((C=this.stateChanges)[n]||(C[n]={}),(k=this.stateChanges[n])[O]||(k[O]={}),c.e(this.stateChanges[n][O],h),this.deletedStates[n]===null){this.deletedStates[n]={};for(const F in this.state[n])F!==O&&(this.deletedStates[n][F]=null)}else if(((f=this.deletedStates[n])===null||f===void 0?void 0:f[O])===null){this.deletedStates[n][O]={};for(const F in this.state[n][O])h[F]||(this.deletedStates[n][O][F]=null)}else for(const F in h)((E=(b=this.deletedStates[n])===null||b===void 0?void 0:b[O])===null||E===void 0?void 0:E[F])===null&&delete this.deletedStates[n][O][F]}removeFeatureState(n,a,h){var f,b,E;if(this.deletedStates[n]===null)return;const C=String(a);if((b=this.deletedStates)[n]||(b[n]={}),h&&a!==void 0)this.deletedStates[n][C]!==null&&((E=this.deletedStates[n])[C]||(E[C]={}),this.deletedStates[n][C][h]=null);else if(a!==void 0)if(!((f=this.stateChanges[n])===null||f===void 0)&&f[C])for(h in this.deletedStates[n][C]={},this.stateChanges[n][C])this.deletedStates[n][C][h]=null;else this.deletedStates[n][C]=null;else this.deletedStates[n]=null}getState(n,a){const h=String(a),f=c.e({},(this.state[n]||{})[h],(this.stateChanges[n]||{})[h]);if(this.deletedStates[n]===null)return{};if(this.deletedStates[n]){const b=this.deletedStates[n][a];if(b===null)return{};for(const E in b)delete f[E]}return f}initializeTileState(n,a){n.setFeatureState(this.state,a)}coalesceChanges(n,a){var h,f,b;const E={};for(const C in this.stateChanges){(h=this.state)[C]||(h[C]={});const k={};for(const O in this.stateChanges[C])(f=this.state[C])[O]||(f[O]={}),c.e(this.state[C][O],this.stateChanges[C][O]),k[O]=this.state[C][O];E[C]=k}for(const C in this.deletedStates){(b=this.state)[C]||(b[C]={});const k={};if(this.deletedStates[C]===null)for(const O in this.state[C])k[O]={},this.state[C][O]={};else for(const O in this.deletedStates[C]){if(this.deletedStates[C][O]===null)this.state[C][O]={};else for(const F of Object.keys(this.deletedStates[C][O]))delete this.state[C][O][F];k[O]=this.state[C][O]}E[C]||(E[C]={}),c.e(E[C],k)}this.stateChanges={},this.deletedStates={},Object.keys(E).length!==0&&(this.revision++,n.setFeatureState(E,a))}}const Ns=89.25;function Vi(_,n){const a=c.al(n.lat,-c.am,c.am);return new c.P(c.Z(n.lng)*_,c.Y(a)*_)}function Ua(_,n){return new c.a7(n.x/_,n.y/_).toLngLat()}function Bs(_){return _.cameraToCenterDistance*Math.min(.85*Math.tan(c.an(90-_.pitch)),Math.tan(c.an(Ns-_.pitch)))}function mc(_,n){const a=_.canonical,h=n/c.ao(a.z),f=a.x+Math.pow(2,a.z)*_.wrap,b=c.ap(new Float64Array(16));return c.Q(b,b,[f*h,a.y*h,0]),c.S(b,b,[h/c.a6,h/c.a6,1]),b}function $a(_,n,a,h,f){const b=c.a7.fromLngLat(_,n),E=f*c.aq(1,_.lat),{x:C,y:k,z:O}=$u(a,h);return new c.a7(b.x+E*-C,b.y+E*-k,b.z+E*-O)}function $u(_,n){const a=c.an(_),h=c.an(n),f=Math.cos(-a),b=Math.sin(a);return{x:b*Math.sin(h),y:-b*Math.cos(h),z:f}}function Ue(_,n,a){const h=n.intersectsFrustum(_);if(!a||h===0)return h;const f=n.intersectsPlane(a);return f===0?0:h===2&&f===2?2:1}function Ep(_,n,a){let h=0;const f=(a-n)/10;for(let b=0;b<10;b++)h+=f*Math.pow(Math.cos(n+(b+.5)/10*(a-n)),_);return h}function Pp(_,n){return function(a,h,f,b,E){const C=2*((_-1)/c.ar(Math.cos(c.an(Ns-E))/Math.cos(c.an(Ns)))-1),k=Math.acos(f/b),O=2*Ep(C-1,0,c.an(E/2)),F=Math.min(c.an(Ns),k+c.an(E/2)),U=Ep(C-1,Math.min(F,k-c.an(E/2)),F),$=Math.atan(h/f),H=Math.hypot(h,f);let oe=a;return oe+=c.ar(b/H/Math.max(.5,Math.cos(c.an(E/2)))),oe+=C*c.ar(Math.cos($))/2,oe-=c.ar(Math.max(1,U/O/n))/2,oe}}const Yt=Pp(9.314,3);function Hn(_,n){const a=(n.roundZoom?Math.round:Math.floor)(_.zoom+c.ar(_.tileSize/n.tileSize));return Math.max(0,a)}function Vs(_,n){const a=_.getCameraFrustum(),h=_.getClippingPlane(),f=_.screenPointToMercatorCoordinate(_.getCameraPoint()),b=c.a7.fromLngLat(_.center,_.elevation);f.z=b.z+Math.cos(_.pitchInRadians)*_.cameraToCenterDistance/_.worldSize;const E=_.getCoveringTilesDetailsProvider(),C=E.allowVariableZoom(_,n),k=Hn(_,n),O=n.minzoom||0,F=n.maxzoom!==void 0?n.maxzoom:_.maxZoom,U=Math.min(Math.max(0,k),F),$=Math.pow(2,U),H=[$*f.x,$*f.y,0],oe=[$*b.x,$*b.y,0],de=Math.hypot(b.x-f.x,b.y-f.y),me=Math.abs(b.z-f.z),pe=Math.hypot(de,me),ge=fe=>({zoom:0,x:0,y:0,wrap:fe,fullyVisible:!1}),we=[],ye=[];if(_.renderWorldCopies&&E.allowWorldCopies())for(let fe=1;fe<=3;fe++)we.push(ge(-fe)),we.push(ge(fe));for(we.push(ge(0));we.length>0;){const fe=we.pop(),be=fe.x,_e=fe.y;let Ie=fe.fullyVisible;const je={x:be,y:_e,z:fe.zoom},Ne=E.getTileBoundingVolume(je,fe.wrap,_.elevation,n);if(!Ie){const rt=Ue(a,Ne,h);if(rt===0)continue;Ie=rt===2}const Xe=E.distanceToTile2d(f.x,f.y,je,Ne);let He=k;C&&(He=(n.calculateTileZoom||Yt)(_.zoom+c.ar(_.tileSize/n.tileSize),Xe,me,pe,_.fov)),He=(n.roundZoom?Math.round:Math.floor)(He),He=Math.max(0,He);const pt=Math.min(He,F);if(fe.wrap=E.getWrap(b,je,fe.wrap),fe.zoom>=pt){if(fe.zoom<O)continue;const rt=U-fe.zoom,Ge=H[0]-.5-(be<<rt),lt=H[1]-.5-(_e<<rt),gt=n.reparseOverscaled?Math.max(fe.zoom,He):fe.zoom;ye.push({tileID:new c.a3(fe.zoom===F?gt:fe.zoom,fe.wrap,fe.zoom,be,_e),distanceSq:c.as([oe[0]-.5-be,oe[1]-.5-_e]),tileDistanceToCamera:Math.sqrt(Ge*Ge+lt*lt)})}else for(let rt=0;rt<4;rt++)we.push({zoom:fe.zoom+1,x:(be<<1)+rt%2,y:(_e<<1)+(rt>>1),wrap:fe.wrap,fullyVisible:Ie})}return ye.sort((fe,be)=>fe.distanceSq-be.distanceSq).map(fe=>fe.tileID)}const Tg=c.a8.fromPoints([new c.P(0,0),new c.P(c.a6,c.a6)]);function Eg(_){return _==="raster"||_==="image"||_==="video"}function L0(_,n,a,h,f,b,E){if(!n.hasData())return!1;const{tileID:C,fadingRole:k,fadingDirection:O,fadingParentID:F}=n;
458if(k===Mo.Base&&O===wi.Incoming&&F)return a[F.key]=F,!0;const U=Math.max(C.overscaledZ-f,b);for(let $=C.overscaledZ-1;$>=U;$--){const H=C.scaledTo($),oe=_.getLoadedTile(H);if(oe)return n.setCrossFadeLogic({fadingRole:Mo.Base,fadingDirection:wi.Incoming,fadingParentID:oe.tileID,fadeEndTime:h+E}),oe.setCrossFadeLogic({fadingRole:Mo.Parent,fadingDirection:wi.Departing,fadeEndTime:h+E}),a[H.key]=H,!0}return!1}function Gu(_,n,a,h,f,b){if(!n.hasData())return!1;const E=n.tileID.children(f);let C=Cp(_,n,E,a,h,f,b);if(C)return!0;for(const k of E)Cp(_,n,k.children(f),a,h,f,b)&&(C=!0);return C}function Cp(_,n,a,h,f,b,E){if(a[0].overscaledZ>=b)return!1;let C=!1;for(const k of a){const O=_.getLoadedTile(k);if(!O)continue;const{fadingRole:F,fadingDirection:U,fadingParentID:$}=O;F===Mo.Base&&U===wi.Departing&&$||(O.setCrossFadeLogic({fadingRole:Mo.Base,fadingDirection:wi.Departing,fadingParentID:n.tileID,fadeEndTime:f+E}),n.setCrossFadeLogic({fadingRole:Mo.Parent,fadingDirection:wi.Incoming,fadeEndTime:f+E})),h[k.key]=k,C=!0}return C}function Pg(_,n,a,h){const f=_.tileID;return!!_.selfFading||!_.hasData()&&!!n.has(f)&&(_.setSelfFadeLogic(a+h),!0)}function et(_,n){var a;_.needsHillshadePrepare=!0,_.needsTerrainPrepare=!0;let h=n.tileID.canonical.x-_.tileID.canonical.x;const f=n.tileID.canonical.y-_.tileID.canonical.y,b=Math.pow(2,_.tileID.canonical.z),E=n.tileID.key;h===0&&f===0||Math.abs(f)>1||(Math.abs(h)>1&&(Math.abs(h+b)===1?h+=b:Math.abs(h-b)===1&&(h-=b)),n.dem&&_.dem&&(_.dem.backfillBorder(n.dem,h,f),!((a=_.neighboringTiles)===null||a===void 0)&&a[E]&&(_.neighboringTiles[E].backfilled=!0)))}class Us{constructor(){this._tiles={}}handleWrapJump(n){const a={};for(const h in this._tiles){const f=this._tiles[h];f.tileID=f.tileID.unwrapTo(f.tileID.wrap+n),a[f.tileID.key]=f}this._tiles=a}setFeatureState(n,a){for(const h in this._tiles)this._tiles[h].setFeatureState(n,a)}getAllTiles(){return Object.values(this._tiles)}getAllIds(n=!1){return n?Object.values(this._tiles).map(a=>a.tileID).sort(c.au).map(a=>a.key):Object.keys(this._tiles)}getTileById(n){return this._tiles[n]}setTile(n,a){this._tiles[n]=a}deleteTileById(n){delete this._tiles[n]}getLoadedTile(n){const a=this.getTileById(n.key);return a!=null&&a.hasData()?a:null}isIdRenderable(n,a=!1){var h;return(h=this.getTileById(n))===null||h===void 0?void 0:h.isRenderable(a)}getRenderableIds(n=0,a){const h=[];for(const f of this.getAllIds())this.isIdRenderable(f,a)&&h.push(this.getTileById(f));return a?h.sort((f,b)=>{const E=f.tileID,C=b.tileID,k=new c.P(E.canonical.x,E.canonical.y)._rotate(-n),O=new c.P(C.canonical.x,C.canonical.y)._rotate(-n);return E.overscaledZ-C.overscaledZ||O.y-k.y||O.x-k.x}).map(f=>f.tileID.key):h.map(f=>f.tileID).sort(c.au).map(f=>f.key)}}class un extends c.E{constructor(n,a,h){super(),this.id=n,this.dispatcher=h,this.on("data",f=>{this._dataHandler(f)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((f,b,E,C)=>{const k=new(Vu(b.type))(f,b,E,C);if(k.id!==f)throw new Error(`Expected Source id to be ${f} instead of ${k.id}`);return k})(n,a,h,this),this._inViewTiles=new Us,this._outOfViewCache=new c.av(0,f=>this._unloadTile(f)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new Tp,this._didEmitContent=!1,this._updated=!1}onAdd(n){var a;
458this.map=n,this._maxTileCacheSize=n?n._maxTileCacheSize:null,this._maxTileCacheZoomLevels=n?n._maxTileCacheZoomLevels:null,!((a=this._source)===null||a===void 0)&&a.onAdd&&this._source.onAdd(n)}onRemove(n){var a;for(const h of this._inViewTiles.getAllTiles())h.unloadVectorData();this.clearTiles(),!((a=this._source)===null||a===void 0)&&a.onRemove&&this._source.onRemove(n),this._inViewTiles=new Us}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const n of this._inViewTiles.getAllTiles())if(n.state!=="loaded"&&n.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;const n=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,n&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(n,a,h){return c._(this,void 0,void 0,function*(){try{const f=yield this._source.loadTile(n);this._tileLoaded(n,a,h,f)}catch(f){n.state="errored",f.status!==404?this._source.fire(new c.l(c.d(f),{tile:n})):this.update(this.transform,this.terrain)}})}_unloadTile(n){this._source.unloadTile&&this._source.unloadTile(n)}_abortTile(n){this._source.abortTile&&this._source.abortTile(n),this._source.fire(new c.n("dataabort",{tile:n,coord:n.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(n){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(const a of this._inViewTiles.getAllTiles())a.upload(n),a.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(n){var a;return this._inViewTiles.getRenderableIds((a=this.transform)===null||a===void 0?void 0:a.bearingInRadians,n)}hasRenderableParent(n){const a=n.overscaledZ-1;if(a>=this._source.minzoom){const h=this.getLoadedTile(n.scaledTo(a));if(h)return this._inViewTiles.isIdRenderable(h.tileID.key)}return!1}reload(n,a=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(const h of this._inViewTiles.getAllIds()){const f=this._inViewTiles.getTileById(h);a&&!this._source.shouldReloadTile(f,a)||(n?this._reloadTile(h,"expired"):f.state!=="errored"&&this._reloadTile(h,"reloading"))}}}_reloadTile(n,a){return c._(this,void 0,void 0,function*(){const h=this._inViewTiles.getTileById(n);h&&(h.state!=="loading"&&(h.state=a),yield this._loadTile(h,n,a))})}_tileLoaded(n,a,h,f){n.timeAdded=Y(),n.selfFading&&(n.fadeEndTime=n.timeAdded+this._rasterFadeDuration),h==="expired"&&(n.refreshedUponExpiration=!0),this._setTileReloadTimer(a,n),f!=null&&f.unmodified||(this.getSource().type==="raster-dem"&&n.dem&&function(b,E){var C,k,O;const F=E.getRenderableIds();for(const U of F){if(!(!((C=b.neighboringTiles)===null||C===void 0)&&C[U]))continue;const $=E.getTileById(U);b.neighboringTiles[U].backfilled||et(b,$),!((O=(k=$.neighboringTiles)===null||k===void 0?void 0:k[b.tileID.key])===null||O===void 0)&&O.backfilled||et($,b)}}(n,this._inViewTiles),this._state.initializeTileState(n,this.map?this.map.painter:null),n.aborted||this._source.fire(new c.n("data",{dataType:"source",tile:n,coord:n.tileID})))}getTile(n){return this.getTileByID(n.key)}getTileByID(n){return this._inViewTiles.getTileById(n)}_retainLoadedChildren(n,a){const h=this._getLoadedDescendents(a),f=new Set;for(const b of a){const E=h[b.key];if(!(E!=null&&E.length)){f.add(b);continue}const C=b.overscaledZ+un.maxOverzooming,k=E.filter(U=>U.tileID.overscaledZ<=C);if(!k.length){f.add(b);continue}const O=Math.min(...k.map(U=>U.tileID.overscaledZ)),F=k.filter(U=>U.tileID.overscaledZ===O).map(U=>U.tileID);for(const U of F)n[U.key]=U;this._areDescendentsComplete(F,O,b.overscaledZ)||f.add(b)}return f}_getLoadedDescendents(n){var a;const h={};for(const f of this._inViewTiles.getAllTiles().filter(b=>b.hasData()))for(const b of n)f.tileID.isChildOf(b)&&(h[a=b.key]||(h[a]=[]),h[b.key].push(f));return h}_areDescendentsComplete(n,a,h){return n.length===1&&n[0].isOverscaled()?n[0].overscaledZ===a:Math.pow(4,a-h)===n.length}getLoadedTile(n){return this._inViewTiles.getLoadedTile(n)}updateCacheSize(n){const a=Math.ceil(n.width/this._source.tileSize)+1,h=Math.ceil(n.height/this._source.tileSize)+1,f=Math.floor(a*h*(this._maxTileC
458acheZoomLevels===null?c.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),b=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,f):f;this._outOfViewCache.setMaxSize(b)}handleWrapJump(n){const a=Math.round((n-(this._prevLng===void 0?n:this._prevLng))/360);this._prevLng=n,a&&(this._inViewTiles.handleWrapJump(a),this._resetTileReloadTimers())}update(n,a){if(!this._sourceLoaded||this._paused)return;let h;this.transform=n,this.terrain=a,this.updateCacheSize(n),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?h=n.getVisibleUnwrappedCoordinates(this._source.tileID).map(k=>new c.a3(k.canonical.z,k.wrap,k.canonical.z,k.canonical.x,k.canonical.y)):(h=Vs(n,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?n.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:a,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(h=h.filter(k=>this._source.hasTile(k)))):h=[],this.usedForTerrain&&(h=this._addTerrainIdealTiles(h));const f=h.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,f&&this.fire(new c.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const b=Hn(n,this._source),E=this._updateRetainedTiles(h,b),C=Eg(this._source.type);C&&this._rasterFadeDuration>0&&!a&&function(k,O,F,U,$,H,oe){const de=Y(),me=c.at(O);for(const pe of O){const ge=k.getTileById(pe.key);ge.fadingDirection!==wi.Departing&&ge.fadeOpacity!==0||ge.resetFadeLogic(),L0(k,ge,F,de,U,$,oe)||Gu(k,ge,F,de,H,oe)||Pg(ge,me,de,oe)||ge.resetFadeLogic()}}(this._inViewTiles,h,E,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),C?this._cleanUpRasterTiles(E):this._cleanUpVectorTiles(E)}_cleanUpRasterTiles(n){for(const a of this._inViewTiles.getAllIds())n[a]||this._removeTile(a)}_cleanUpVectorTiles(n){for(const a of this._inViewTiles.getAllIds()){const h=this._inViewTiles.getTileById(a);n[a]?h.clearSymbolFadeHold():h.hasSymbolBuckets?h.holdingForSymbolFade()?h.symbolFadeFinished()&&this._removeTile(a):h.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(a)}}_addTerrainIdealTiles(n){const a=[];for(const h of n)if(h.canonical.z>this._source.minzoom){const f=h.scaledTo(h.canonical.z-1);a.push(f);const b=h.scaledTo(Math.max(this._source.minzoom,Math.min(h.canonical.z,5)));a.push(b)}return n.concat(a)}releaseSymbolFadeTiles(){for(const n of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(n).holdingForSymbolFade()&&this._removeTile(n)}_updateRetainedTiles(n,a){var h;const f=new Set;for(const O of n)this._addTile(O).hasData()||f.add(O);const b=n.reduce((O,F)=>(O[F.key]=F,O),{}),E=this._retainLoadedChildren(b,f),C={},k=Math.max(a-un.maxUnderzooming,this._source.minzoom);for(const O of E){let F=this._inViewTiles.getTileById(O.key),U=F==null?void 0:F.wasRequested();for(let $=O.overscaledZ-1;$>=k;--$){const H=O.scaledTo($);if(C[H.key])break;if(C[H.key]=!0,F=this.getTile(H),!F&&U&&(F=this._addTile(H)),F){const oe=F.hasData();if((oe||!(!((h=this.map)===null||h===void 0)&&h.cancelPendingTileRequestsWhileZooming)||U)&&(b[H.key]=H),U=F.wasRequested(),oe)break}}}return b}_addTile(n){let a=this._inViewTiles.getTileById(n.key);if(a)return a;a=this._outOfViewCache.getAndRemove(n),a&&(a.resetFadeLogic(),this._setTileReloadTimer(n.key,a),a.tileID=n,this._state.initializeTileState(a,this.map?this.map.painter:null));const h=a;return a||(a=new Va(n,this._source.tileSize*n.overscaleFactor()),this._loadTile(a,n.key,a.state)),a.uses++,this._inViewTiles.setTile(n.key,a),h||this._source.fire(new c.n("dataloading",{tile:a,coord:a.tileID,dataType:"source"})),a}_setTileReloadTimer(n,a){this._clearTileReloadTimer(n);const h=a.getExpiryTimeout();h&&(this._timers[n]=setTimeout(()=>{this._reloadTile(n,"expired"),delete this._timers[n]},h))}_clearTileReloadTimer(n){const a=this._timers[n];a&&(clearTimeout(a),delete this._timers[n])}_resetTileReloadTimers(){for(const n in this._timers)clearTimeout(this._timers[n]),delete this._timers[n];for(const n of this._inViewTiles.getAllIds()){const a=this._inViewTiles.getTileById(n);this._setTileReloadTimer(n,a)}}refreshTiles(n){for(const a of this._inViewTiles.getAllIds()){const h=this._inViewTiles.getTileById(a);(this._inViewTiles.isIdRenderable(a)||h.state=="errored")&&n.some(f=>f.equals(h.tileID.canonical))&&this._reloadTile(a,"expired")}}_removeTile(n){const a=this._inViewTiles.getTileById(n);a&&(a.uses--,this._inViewTiles.deleteTileById(n),this._clearTileReloadTimer(n),a.uses>0||(a.hasData()&&a.state!=="reloading"?this._outOfViewCache.add(a.tileID,a,a.getExpiryTimeout()):(a.aborted=!0,this._abortTile(a),this._unloadTile(a))))}_dataHandler(n){n.dataType==="source"&&(n.sourceDataType!=="metadata"?n.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(n.sourceDataChanged,n.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const n of this._inViewTiles.getAllIds())this._removeTile(n);this._outOfViewCache.reset()}tilesIn(n,a,h){const f=[],b=this.transform;if(!b)return f;const E=b.getCoveringTilesDetailsProvider().allowWorldCopies(),C=h?b.getCameraQueryGeometry(n):n,k=H=>b.screenPointToMercatorCoordinate(H,this.terrain),O=this.transformBbox(n,k,!E),F=this.transformBbox(C,k,!E),U=this.getIds(),$=c.a8.fromPoints(F
458);for(const H of U){const oe=this._inViewTiles.getTileById(H);if(oe.holdingForSymbolFade())continue;const de=E?[oe.tileID]:[oe.tileID.unwrapTo(-1),oe.tileID.unwrapTo(0)],me=Math.pow(2,b.zoom-oe.tileID.overscaledZ),pe=a*oe.queryPadding*c.a6/oe.tileSize/me;for(const ge of de){const we=$.map(ye=>ge.getTilePoint(new c.a7(ye.x,ye.y)));if(we.expandBy(pe),we.intersects(Tg)){const ye=O.map(be=>ge.getTilePoint(be)),fe=F.map(be=>ge.getTilePoint(be));f.push({tile:oe,tileID:E?ge:ge.unwrapTo(0),queryGeometry:ye,cameraQueryGeometry:fe,scale:me})}}}return f}transformBbox(n,a,h){let f=n.map(a);if(h){const b=c.a8.fromPoints(n);b.shrinkBy(.001*Math.min(b.width(),b.height()));const E=b.map(a);c.a8.fromPoints(f).covers(E)||(f=f.map(C=>C.x>.5?new c.a7(C.x-1,C.y,C.z):C))}return f}getVisibleCoordinates(n){const a=this.getRenderableIds(n).map(h=>this._inViewTiles.getTileById(h).tileID);return this.transform&&this.transform.populateCache(a),a}hasTransition(){return!!this._source.hasTransition()||Eg(this._source.type)&&function(n,a){if(a<=0)return!1;const h=Y();for(const f of n.getAllTiles())if(f.fadeEndTime>=h)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(n){this._rasterFadeDuration=n}setFeatureState(n,a,h){n||(n=c.ag),this._state.updateState(n,a,h)}removeFeatureState(n,a,h){n||(n=c.ag),this._state.removeFeatureState(n,a,h)}getFeatureState(n,a){return n||(n=c.ag),this._state.getState(n,a)}setDependencies(n,a,h){const f=this._inViewTiles.getTileById(n);f&&f.setDependencies(a,h)}reloadTilesForDependencies(n,a){for(const h of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(h).hasDependency(n,a)&&this._reloadTile(h,"reloading");this._outOfViewCache.filter(h=>!h.hasDependency(n,a))}areTilesLoaded(){for(const n of this._inViewTiles.getAllTiles())if(n.state!=="loaded"&&n.state!=="errored")return!1;return!0}}un.maxUnderzooming=10,un.maxOverzooming=3;class Ip{constructor(n,a){this.reset(n,a)}reset(n,a){this.points=n||[],this._distances=[0];for(let h=1;h<this.points.length;h++)this._distances[h]=this._distances[h-1]+this.points[h].dist(this.points[h-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(a||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(n){if(this.points.length===1)return this.points[0];n=c.al(n,0,1);let a=1,h=this._distances[a];const f=n*this.paddedLength+this.padding;for(;h<f&&a<this._distances.length;)h=this._distances[++a];const b=a-1,E=this._distances[b],C=h-E,k=C>0?(f-E)/C:0;return this.points[b].mult(1-k).add(this.points[a].mult(k))}}function ss(_,n){let a=!0;return _==="always"||_!=="never"&&n!=="never"||(a=!1),a}class at{constructor(n,a,h){const f=this.boxCells=[],b=this.circleCells=[];this.xCellCount=Math.ceil(n/h),this.yCellCount=Math.ceil(a/h);for(let E=0;E<this.xCellCount*this.yCellCount;E++)f.push([]),b.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=n,this.height=a,this.xScale=this.xCellCount/n,this.yScale=this.yCellCount/a,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(n,a,h,f,b){this._forEachCell(a,h,f,b,this._insertBoxCell,this.boxUid++),this.boxKeys.push(n),this.bboxes.push(a),this.bboxes.push(h),this.bboxes.push(f),this.bboxes.push(b)}
vendor: 13,827 bytes, line 458
458insertCircle(n,a,h,f){this._forEachCell(a-f,h-f,a+f,h+f,this._insertCircleCell,this.circleUid++),this.circleKeys.push(n),this.circles.push(a),this.circles.push(h),this.circles.push(f)}_insertBoxCell(n,a,h,f,b,E){this.boxCells[b].push(E)}_insertCircleCell(n,a,h,f,b,E){this.circleCells[b].push(E)}_query(n,a,h,f,b,E,C){if(h<0||n>this.width||f<0||a>this.height)return[];const k=[];if(n<=0&&a<=0&&this.width<=h&&this.height<=f){if(b)return[{key:null,x1:n,y1:a,x2:h,y2:f}];for(let O=0;O<this.boxKeys.length;O++)k.push({key:this.boxKeys[O],x1:this.bboxes[4*O],y1:this.bboxes[4*O+1],x2:this.bboxes[4*O+2],y2:this.bboxes[4*O+3]});for(let O=0;O<this.circleKeys.length;O++){const F=this.circles[3*O],U=this.circles[3*O+1],$=this.circles[3*O+2];k.push({key:this.circleKeys[O],x1:F-$,y1:U-$,x2:F+$,y2:U+$})}}else this._forEachCell(n,a,h,f,this._queryCell,k,{hitTest:b,overlapMode:E,seenUids:{box:{},circle:{}}},C);return k}query(n,a,h,f){return this._query(n,a,h,f,!1,null)}hitTest(n,a,h,f,b,E){return this._query(n,a,h,f,!0,b,E).length>0}hitTestCircle(n,a,h,f,b){const E=n-h,C=n+h,k=a-h,O=a+h;if(C<0||E>this.width||O<0||k>this.height)return!1;const F=[];return this._forEachCell(E,k,C,O,this._queryCellCircle,F,{hitTest:!0,overlapMode:f,circle:{x:n,y:a,radius:h},seenUids:{box:{},circle:{}}},b),F.length>0}_queryCell(n,a,h,f,b,E,C,k){const{seenUids:O,hitTest:F,overlapMode:U}=C,$=this.boxCells[b],H=1e-6;if($!==null){const de=this.bboxes;for(const me of $)if(!O.box[me]){O.box[me]=!0;const pe=4*me,ge=this.boxKeys[me];if(n<=de[pe+2]+H&&a<=de[pe+3]+H&&h>=de[pe+0]-H&&f>=de[pe+1]-H&&(!k||k(ge))&&(!F||!ss(U,ge.overlapMode))&&(E.push({key:ge,x1:de[pe],y1:de[pe+1],x2:de[pe+2],y2:de[pe+3]}),F))return!0}}const oe=this.circleCells[b];if(oe!==null){const de=this.circles;for(const me of oe)if(!O.circle[me]){O.circle[me]=!0;const pe=3*me,ge=this.circleKeys[me];if(this._circleAndRectCollide(de[pe],de[pe+1],de[pe+2],n,a,h,f)&&(!k||k(ge))&&(!F||!ss(U,ge.overlapMode))){const we=de[pe],ye=de[pe+1],fe=de[pe+2];if(E.push({key:ge,x1:we-fe,y1:ye-fe,x2:we+fe,y2:ye+fe}),F)return!0}}}return!1}_queryCellCircle(n,a,h,f,b,E,C,k){const{circle:O,seenUids:F,overlapMode:U}=C,$=this.boxCells[b];if($!==null){const oe=this.bboxes;for(const de of $)if(!F.box[de]){F.box[de]=!0;const me=4*de,pe=this.boxKeys[de];if(this._circleAndRectCollide(O.x,O.y,O.radius,oe[me+0],oe[me+1],oe[me+2],oe[me+3])&&(!k||k(pe))&&!ss(U,pe.overlapMode))return E.push(!0),!0}}const H=this.circleCells[b];if(H!==null){const oe=this.circles;for(const de of H)if(!F.circle[de]){F.circle[de]=!0;const me=3*de,pe=this.circleKeys[de];if(this._circlesCollide(oe[me],oe[me+1],oe[me+2],O.x,O.y,O.radius)&&(!k||k(pe))&&!ss(U,pe.overlapMode))return E.push(!0),!0}}}_forEachCell(n,a,h,f,b,E,C,k){const O=this._convertToXCellCoord(n),F=this._convertToYCellCoord(a),U=this._convertToXCellCoord(h),$=this._convertToYCellCoord(f);for(let H=O;H<=U;H++)for(let oe=F;oe<=$;oe++)if(b.call(this,n,a,h,f,this.xCellCount*oe+H,E,C,k))return}_convertToXCellCoord(n){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(n*this.xScale)))}_convertToYCellCoord(n){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(n*this.yScale)))}_circlesCollide(n,a,h,f,b,E){const C=f-n,k=b-a,O=h+E;return O*O>C*C+k*k}_circleAndRectCollide(n,a,h,f,b,E,C){const k=(E-f)/2,O=Math.abs(n-(f+k));if(O>k+h)return!1;const F=(C-b)/2,U=Math.abs(a-(b+F));if(U>F+h)return!1;if(O<=k||U<=F)return!0;const $=O-k,H=U-F;return $*$+H*H<=h*h}}function It(_,n){const a=1/(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]),h=1/(n[8]*n[8]+n[9]*n[9]+n[10]*n[10]),f=n[0]*a,b=n[4]*a,E=n[8]*h,C=n[1]*a,k=n[5]*a,O=n[9]*h,F=n[2]*a,U=n[6]*a,$=n[10]*h;_[0]=f,_[1]=b,_[2]=E,_[4]=C,_[5]=k,_[6]=O,_[8]=F,_[9]=U,_[10]=$;const H=n[12],oe=n[13],de=n[14];return _[12]=-f*H-C*oe-F*de,_[13]=-b*H-k*oe-U*de,_[14]=-E*H-O*oe-$*de,_[3]=0,_[7]=0,_[11]=0,_[15]=1,_}const Dt=c.O();function oi(_,n,a){const h=c.O();if(!_){const{vecSouth:U,vecEast:$}=Ao(n),H=L();H[0]=$[0],H[1]=$[1],H[2]=U[0],H[3]=U[1],f=H,(F=(E=(b=H)[0])*(O=b[3])-(k=b[2])*(C=b[1]))&&(f[0]=O*(F=1/F),f[1]=-C*F,f[2]=-k*F,f[3]=E*F),h[0]=H[0],h[1]=H[1],h[4]=H[2],h[5]=H[3]}var f,b,E,C,k,O,F;return c.S(h,h,[1/a,1/a,1]),h}function qu(_,n,a,h){if(_){const f=c.O();if(!n){const{vecSouth:b,vecEast:E}=Ao(a);f[0]=E[0],f[1]=E[1],f[4]=b[0],f[5]=b[1]}return c.S(f,f,[h,h,1]),f}return a.pixelsToClipSpaceMatrix}function Ao(_){const n=Math.cos(_.rollInRadians),a=Math.sin(_.rollInRadians),h=Math.cos(_.pitchInRadians),f=Math.cos(_.bearingInRadians),b=Math.sin(_.bearingInRadians),E=c.az();E[0]=-f*h*a-b*n,E[1]=-b*h*a+f*n;const C=c.aA(E);C<1e-9?c.aB(E):c.aC(E,E,1/C);const k=c.az();k[0]=f*h*n-b*a,k[1]=b*h*n+f*a;const O=c.aA(k);return O<1e-9?c.aB(k):c.aC(k,k,1/O),{vecEast:k,vecSouth:E}}function Mt(_,n,a,h){let f;h?(f=[_,n,h(_,n),1],c.aE(f,f,a)):(f=[_,n,0,1],Hu(f,f,a));const b=f[3];return{point:new c.P(f[0]/b,f[1]/b),signedDistanceFromCamera:b,isOccluded:!1}}function gc(_,n){return .5+_/n*.5}function yc(_,n){return _.x>=-n[0]&&_.x<=n[0]&&_.y>=-n[1]&&_.y<=n[1]}function Wu(_,n,a,h,f,b,E,C,k,O,F,U,$){const H=a?_.textSizeData:_.iconSizeData,oe=c.aw(H,n.transform.zoom),de=[256/n.width*2+1,256/n.height*2+1],me=a?_.text.dynamicLayoutVertexArray:_.icon.dynamicLayoutVertexArray;me.clear();const pe=_.lineVertexArray,ge=a?_.text.placedSymbolArray:_.icon.placedSymbolArray,we=n.transform.width/n.transform.height;let ye=!1;for(let fe=0;fe<ge.length;fe++){const be=ge.get(fe);if(be.hidden||be.writingMode===c.ax.vertical&&!ye){Gs(be.numGlyphs,me);continue}ye=!1;const _e=new c.P(be.anchorX,be.anchorY),Ie={getElevation:$,pitchedLabelPlaneMatrix:h,lineVertexArray:pe,pitchWithMap:b,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:n.transform,tileAnchorPoint:_e,unwrappedTileID:k,width:O,height:F,translation:U},je=Wa(be.anchorX,be.anchorY,Ie);if(!yc(je.point,de)){Gs(be.numGlyphs,me);continue}const Ne=gc(n.transform.cameraToCenterDistance,je.signedDistanceFromCamera),Xe=c.ay(H,oe,be),He=b?Xe*n.transform.getPitchedTextCorrection(be.anchorX,be.anchorY,k)/Ne:Xe*Ne,pt=qa({projectionContext:Ie,pitchedLabelPlaneMatrixInverse:f,symbol:be,fontSize:He,flip:!1,keepUpright:E,glyphOffsetArray:_.glyphOffsetArray,dynamicLayoutVertexArray:me,aspectRatio:we,rotateToLine:C});ye=pt.useVertical,(pt.notEnoughRoom||ye||pt.needsFlipping&&qa({projectionContext:Ie,pitchedLabelPlaneMatrixInverse:f,symbol:be,fontSize:He,flip:!0,keepUpright:E,glyphOffsetArray:_.glyphOffsetArray,dynamicLayoutVertexArray:me,aspectRatio:we,rotateToLine:C}).notEnoughRoom)&&Gs(be.numGlyphs,me)}a?_.text.dynamicLayoutVertexBuffer.updateData(me):_.icon.dynamicLayoutVertexBuffer.updateData(me)}function Ga(_,n,a,h,f,b,E,C){const k=b.glyphStartIndex+b.numGlyphs,O=b.lineStartIndex,F=b.lineStartIndex+b.lineLength,U=n.getoffsetX(b.glyphStartIndex),$=n.getoffsetX(k-1),H=Ui(_*U,a,h,f,b.segment,O,F,C,E);if(!H)return null;const oe=Ui(_*$,a,h,f,b.segment,O,F,C,E);return oe?C.projectionCache.anyProjectionOccluded?null:{first:H,last:oe}:null}function _c(_,n,a,h){return _===c.ax.horizontal&&Math.abs(a.y-n.y)>Math.abs(a.x-n.x)*h?{useVertical:!0}:(_===c.ax.vertical?n.y<a.y:n.x>a.x)?{needsFlipping:!0}:null}function qa(_){const{projectionContext:n,pitchedLabelPlaneMatrixInverse:a,symbol:h,fontSize:f,flip:b,keepUpright:E,glyphOffsetArray:C,dynamicLayoutVertexArray:k,aspectRatio:O,rotateToLine:F}=_,U=f/24,$=h.lineOffsetX*U,H=h.lineOffsetY*U;let oe;if(h.numGlyphs>1){const de=h.glyphStartIndex+h.numGlyphs,me=h.lineStartIndex,pe=h.lineStartIndex+h.lineLength,ge=Ga(U,C,$,H,b,h,F,n);if(!ge)return{notEnoughRoom:!0};const we=Zu(ge.first.point.x,ge.first.point.y,n,a),ye=Zu(ge.last.point.x,ge.last.point.y,n,a);if(E&&!b){const fe=_c(h.writingMode,we,ye,O);if(fe)return fe}oe=[ge.first];for(let fe=h.glyphStartIndex+1;fe<de-1;fe++){const be=Ui(U*C.getoffsetX(fe),$,H,b,h.segment,me,pe,n,F);if(!be)return{notEnoughRoom:!0};oe.push(be)}oe.push(ge.last)}else{if(E&&!b){const me=Jt(n.tileAnchorPoint.x,n.tileAnchorPoint.y,n).point,pe=h.lineStartIndex+h.segment+1,ge=new c.P(n.lineVertexArray.getx(pe),n.lineVertexArray.gety(pe)),we=Jt(ge.x,ge.y,n),ye=we.signedDistanceFromCamera>0?we.point:vc(n.tileAnchorPoint,ge,me,1,n),fe=Zu(me.x,me.y,n,a),be=Zu(ye.x,ye.y,n,a),_e=_c(h.writingMode,fe,be,O);if(_e)return _e}const de=Ui(U*C.getoffsetX(h.glyphStartIndex),$,H,b,h.segment,h.lineStartIndex,h.lineStartIndex+h.lineLength,n,F);if(!de||n.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};oe=[de]}for(const de of oe)c.aD(k,de.point,de.angle);return{}}function vc(_,n,a,h,f){const b=_.add(_.sub(n)._unit()),E=Jt(b.x,b.y,f).point,C=a.sub(E);return a.add(C._mult(h/C.mag()))}function dn(_,n,a){const h=n.projectionCache;if(h.projections[_])return h.projections[_];const f=new c.P(n.lineVertexArray.getx(_),n.lineVertexArray.gety(_)),b=Jt(f.x,f.y,n);if(b.signedDistanceFromCamera>0)return h.projections[_]=b.point,h.anyProjectionOccluded||(h.anyProjectionOccluded=b.isOccluded),b.point;const E=_-a.direction;return vc(a.distanceFromAnchor===0?n.tileAnchorPoint:new c.P(n.lineVertexArray.getx(E),n.lineVertexArray.gety(E)),f,a.previousVertex,a.absOffsetX-a.distanceFromAnchor+1,n)}function Jt(_,n,a){const h=_+a.translation[0],f=n+a.translation[1];let b;return a.pitchWithMap?(b=Mt(h,f,a.pitchedLabelPlaneMatrix,a.getElevation),b.isOccluded=!1):(b=a.transform.projectTileCoordinates(h,f,a.unwrappedTileID,a.getElevation),b.point.x=(.5*b.point.x+.5)*a.width,b.point.y=(.5*-b.point.y+.5)*a.height),b}function Zu(_,n,a,h){if(a.pitchWithMap){const f=[_,n,0,1];return c.aE(f,f,h),a.transform.projectTileCoordinates(f[0]/f[3],f[1]/f[3],a.unwrappedTileID,a.getElevation).point}return{x:_/a.width*2-1,y:1-n/a.height*2}}function Wa(_,n,a){return a.transform.projectTileCoordinates(_,n,a.unwrappedTileID,a.getElevation)}function xc(_,n,a){return _._unit()._perp()._mult(n*a)}function $s(_,n,a,h,f,b,E,C,k){if(C.projectionCache.offsets[_])return C.projectionCache.offsets[_];const O=a.add(n);if(_+k.direction<h||_+k.direction>=f)return C.projectionCache.offsets[_]=O,O;const F=dn(_+k.direction,C,k),U=xc(F.sub(a),E,k.direction),$=a.add(U),H=F.add(U);return C.projectionCache.offsets[_]=c.aF(b,O,$,H)||O,C.projectionCache.offsets[_]}function Ui(_,n,a,h,f,b,E,C,k){const O=h?_-n:_+n;let F=O>0?1:-1,U=0;h&&(F*=-1,U=Math.PI),F<0&&(U+=Math.PI);let $,H=F>0?b+f:b+f+1;C.projectionCache.cachedAnchorPoint?$=C.projectionCache.cachedAnchorPoint:($=Jt(C.tileAnchorPoint.x,C.tileAnchorPoint.y,C).point,C.projectionCache.cachedAnchorPoint=$);let oe,de,me=$,pe=$,ge=0,we=0;const ye=Math.abs(O),fe=[];let be;for(;ge+we<=ye;){if(H+=F,H<b||H>=E)return null;ge+=we,pe=me,de=oe;const je={absOffsetX:ye,direction:F,distanceFromAnchor:ge,previousVertex:pe};if(me=dn(H,C,je),a===0)fe.push(pe),be=me.sub(pe);else{let Ne;const Xe=me.sub(pe);Ne=Xe.mag()===0?xc(dn(H+F,C,je).sub(me),a,F):xc(Xe,a,F),de||(de=pe.add(Ne)),oe=$s(H,Ne,me,b,E,de,a,C,je),fe.push(de),be=oe.sub(de)}we=be.mag()}const _e=be._mult((ye-ge)/we)._add(de||pe),Ie=U+Math.atan2(me.y-pe.y,me.x-pe.x);return fe.push(_e),{point:_e,angle:k?Ie:0,path:fe}}const Cg=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Gs(_,n){for(let a=0;a<_;a++){const h=n.length;n.resize(h+4),n.float32.set(Cg,3*h)}}function Hu(_,n,a){const h=n[0],f=n[1];return _[0]=a[0]*h+a[4]*f+a[12],_[1]=a[1]*h+a[5]*f+a[13],_[3]=a[3]*h+a[7]*f+a[15],_}const wr=100;class Ig{constructor(n,a=new at(n.width+200,n.height+200,25),h=new at(n.width+200,n.height+200,25)){this.transform=n,this.grid=a,this.ignoredGrid=h,this.pitchFactor=Math.cos(n.pitch*Math.PI/180)*n.cameraToCenterDistance,this.screenRightBoundary=n.width+wr,this.screenBottomBoundary=n.height+wr,this.gridRightBoundary=n.width+200,this.gridBottomBoundary=n.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(n,a,h,f,b,E,C,k,O,F,U,$){const H=this.projectAndGetPerspectiveRatio(n.anchorPointX+k[0],n.anchorPointY+k[1],b,F,$),oe=h*H.perspectiveRatio;let de;if(E||C)de=this._projectCollisionBox(n,oe,f,b,E,C,k,H,F,U,$);else{const be=H.x+(U?U.x*oe:0),_e=H.y+(U?U.y*oe:0);de={allPointsOccluded:!1,box:[be+n.x1*oe,_e+n.y1*oe,be+n.x2*oe,_e+n.y2*oe]}}const[me,pe,ge,we]=de.box,ye=E?de.allPointsOccluded:H.isOccluded;let fe=ye;return fe||(fe=H.perspectiveRatio<this.perspectiveRatioCutoff),fe||(fe=!this.isInsideGrid(me,pe,ge,we)),fe||a!=="always"&&this.grid.hitTest(me,pe,ge,we,a,O)?{box:[me,pe,ge,we],placeable:!1,offscreen:!1,occluded:ye}:{box:[me,pe,ge,we],placeable:!0,offscreen:this.isOffscreen(me,pe,ge,we),occluded:ye}}placeCollisionCircles(n,a,h,f,b,E,C,k,O,F,U,$,H,oe){const de=[],me=new c.P(a.anchorX,a.anchorY),pe=this.getPerspectiveRatio(me.x,me.y,E,oe),ge=(O?b*this.transform.getPitchedTextCorrection(a.anchorX,a.anchorY,E)/pe:b*pe)/c.aJ,we={getElevation:oe,pitchedLabelPlaneMatrix:C,lineVertexArray:h,pitchWithMap:O,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:me,unwrappedTileID:E,width:this.transform.width,height:this.transform.height,translation:H},ye=Ga(ge,f,a.lineOffsetX*ge,a.lineOffsetY*ge,!1,a,!1,we);let fe=!1,be=!1,_e=!0;if(ye){const Ie=.5*U*pe+$,je=new c.P(-100,-100),Ne=new c.P(this.screenRightBoundary,this.screenBottomBoundary),Xe=new Ip,He=ye.first,pt=ye.last;let rt=[];for(let gt=He.path.length-1;gt>=1;gt--)rt.push(He.path[gt]);for(let gt=1;gt<pt.path.length;gt++)rt.push(pt.path[gt]);const Ge=2.5*Ie;if(O){const gt=this.projectPathToScreenSpace(rt,we);rt=gt.some(Kt=>Kt.signedDistanceFromCamera<=0)?[]:gt.map(Kt=>Kt.point)}let lt=[];if(rt.length>0){const gt=rt[0].clone(),Kt=rt[0].clone();for(let Rr=1;Rr<rt.length;Rr++)gt.x=Math.min(gt.x,rt[Rr].x),gt.y=Math.min(gt.y,rt[Rr].y),Kt.x=Math.max(Kt.x,rt[Rr].x),Kt.y=Math.max(Kt.y,rt[Rr].y);lt=gt.x>=je.x&&Kt.x<=Ne.x&&gt.y>=je.y&&Kt.y<=Ne.y?[rt]:Kt.x<je.x||gt.x>Ne.x||Kt.y<je.y||gt.y>Ne.y?[]:c.aG([rt],je.x,je.y,Ne.x,Ne.y)}for(const gt of lt){Xe.reset(gt,.25*Ie);let Kt=0;
458Kt=Xe.length<=.5*Ie?1:Math.ceil(Xe.paddedLength/Ge)+1;for(let Rr=0;Rr<Kt;Rr++){const tr=Rr/Math.max(Kt-1,1),Lr=Xe.lerp(tr),Br=Lr.x+wr,Sn=Lr.y+wr;de.push(Br,Sn,Ie,0);const Sr=Br-Ie,jn=Sn-Ie,hn=Br+Ie,Qr=Sn+Ie;if(_e&&(_e=this.isOffscreen(Sr,jn,hn,Qr)),be||(be=this.isInsideGrid(Sr,jn,hn,Qr)),n!=="always"&&this.grid.hitTestCircle(Br,Sn,Ie,n,F)&&(fe=!0,!k))return{circles:[],offscreen:!1,collisionDetected:fe}}}}return{circles:!k&&fe||!be||pe<this.perspectiveRatioCutoff?[]:de,offscreen:_e,collisionDetected:fe}}projectPathToScreenSpace(n,a){const h=function(f,b){const E=Dt;return function(C,k){const O=1/(k[0]*k[5]-k[1]*k[4]);C[0]=k[5]*O,C[1]=-k[1]*O,C[2]=0,C[3]=0,C[4]=-k[4]*O,C[5]=k[0]*O,C[6]=0,C[7]=0,C[8]=0,C[9]=0,C[10]=1/k[10],C[11]=0,C[12]=0,C[13]=0,C[14]=0,C[15]=1/k[15]}(E,b.pitchedLabelPlaneMatrix),f.map(C=>{const k=Mt(C.x,C.y,E,b.getElevation),O=b.transform.projectTileCoordinates(k.point.x,k.point.y,b.unwrappedTileID,b.getElevation);return O.point.x=(.5*O.point.x+.5)*b.width,O.point.y=(.5*-O.point.y+.5)*b.height,O})}(n,a);return function(f){let b=0,E=0,C=0,k=0;for(let O=0;O<f.length;O++)f[O].isOccluded?(C=O+1,k=0):(k++,k>E&&(E=k,b=C));return f.slice(b,b+E)}(h)}queryRenderedSymbols(n){if(n.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const a=[],h=new c.a8;for(const U of n){const $=new c.P(U.x+wr,U.y+wr);h.extend($),a.push($)}const{minX:f,minY:b,maxX:E,maxY:C}=h,k=this.grid.query(f,b,E,C).concat(this.ignoredGrid.query(f,b,E,C)),O={},F={};for(const U of k){const $=U.key;if(O[$.bucketInstanceId]===void 0&&(O[$.bucketInstanceId]={}),O[$.bucketInstanceId][$.featureIndex])continue;const H=[new c.P(U.x1,U.y1),new c.P(U.x2,U.y1),new c.P(U.x2,U.y2),new c.P(U.x1,U.y2)];c.aH(a,H)&&(O[$.bucketInstanceId][$.featureIndex]=!0,F[$.bucketInstanceId]===void 0&&(F[$.bucketInstanceId]=[]),F[$.bucketInstanceId].push($.featureIndex))}return F}insertCollisionBox(n,a,h,f,b,E){(h?this.ignoredGrid:this.grid).insert({bucketInstanceId:f,featureIndex:b,collisionGroupID:E,overlapMode:a},n[0],n[1],n[2],n[3])}insertCollisionCircles(n,a,h,f,b,E){const C=h?this.ignoredGrid:this.grid,k={bucketInstanceId:f,featureIndex:b,collisionGroupID:E,overlapMode:a};for(let O=0;O<n.length;O+=4)C.insertCircle(k,n[O],n[O+1],n[O+2])}projectAndGetPerspectiveRatio(n,a,h,f,b){if(b){let E;f?(E=[n,a,f(n,a),1],c.aE(E,E,b)):(E=[n,a,0,1],Hu(E,E,b));const C=E[3];return{x:(E[0]/C+1)/2*this.transform.width+wr,y:(-E[1]/C+1)/2*this.transform.height+wr,perspectiveRatio:.5+this.transform.cameraToCenterDistance/C*.5,isOccluded:!1,signedDistanceFromCamera:C}}{const E=this.transform.projectTileCoordinates(n,a,h,f);return{x:(E.point.x+1)/2*this.transform.width+wr,y:(1-E.point.y)/2*this.transform.height+wr,perspectiveRatio:.5+this.transform.cameraToCenterDistance/E.signedDistanceFromCamera*.5,isOccluded:E.isOccluded,signedDistanceFromCamera:E.signedDistanceFromCamera}}}getPerspectiveRatio(n,a,h,f){const b=this.transform.projectTileCoordinates(n,a,h,f);return .5+this.transform.cameraToCenterDistance/b.signedDistanceFromCamera*.5}isOffscreen(n,a,h,f){return h<wr||n>=this.screenRightBoundary||f<wr||a>this.screenBottomBoundary}isInsideGrid(n,a,h,f){return h>=0&&n<this.gridRightBoundary&&f>=0&&a<this.gridBottomBoundary}getViewportMatrix(){const n=c.ap([]);return c.Q(n,n,[-100,-100,0]),n}_projectCollisionBox(n,a,h,f,b,E,C,k,O,F,U){let $=1,H=0,oe=0,de=1;const me=n.anchorPointX+C[0],pe=n.anchorPointY+C[1];if(E&&!b){const rt=this.projectAndGetPerspectiveRatio(me+1,pe,f,O,U),Ge=rt.x-k.x,lt=Math.atan((rt.y-k.y)/Ge)+(Ge<0?Math.PI:0),gt=Math.sin(lt),Kt=Math.cos(lt);$=Kt,H=gt,oe=-gt,de=Kt}else if(!E&&b){const rt=Ao(this.transform);$=rt.vecEast[0],H=rt.vecEast[1],oe=rt.vecSouth[0],de=rt.vecSouth[1]}let ge=k.x,we=k.y,ye=a;b&&(ge=me,we=pe,ye=Math.pow(2,-(this.transform.zoom-h.overscaledZ)),ye*=this.transform.getPitchedTextCorrection(me,pe,f),F||(ye*=c.al(.5+k.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),F&&(ge+=$*F.x*ye+oe*F.y*ye,we+=H*F.x*ye+de*F.y*ye);const fe=n.x1*ye,be=n.x2*ye,_e=(fe+be)/2,Ie=n.y1*ye,je=n.y2*ye,Ne=(Ie+je)/2,Xe=[{offsetX:fe,offsetY:Ie},{offsetX:_e,offsetY:Ie},{offsetX:be,offsetY:Ie},{offsetX:be,offsetY:Ne},{offsetX:be,offsetY:je},{offsetX:_e,offsetY:je},{offsetX:fe,offsetY:je},{offsetX:fe,offsetY:Ne}];let He=[];for(const{offsetX:rt,offsetY:Ge}of Xe)He.push(new c.P(ge+$*rt+oe*Ge,we+H*rt+de*Ge));let pt=!1;if(b){const rt=He.map(Ge=>this.projectAndGetPerspectiveRatio(Ge.x,Ge.y,f,O,U));pt=rt.some(Ge=>!Ge.isOccluded),He=rt.map(Ge=>new c.P(Ge.x,Ge.y))}else pt=!0;return{box:c.aI(He),allPointsOccluded:!pt}}}class Mg{constructor(n,a,h,f){this.opacity=n?Math.max(0,Math.min(1,n.opacity+(n.placed?a:-a)
458)):f&&h?1:0,this.placed=h}isHidden(){return this.opacity===0&&!this.placed}}class bc{constructor(n,a,h,f,b){this.text=new Mg(n?n.text:null,a,h,b),this.icon=new Mg(n?n.icon:null,a,f,b)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Ag{constructor(n,a,h){this.text=n,this.icon=a,this.skipFade=h}}class Rg{constructor(n,a,h,f,b){this.bucketInstanceId=n,this.featureIndex=a,this.sourceLayerIndex=h,this.bucketIndex=f,this.tileID=b}}class kg{constructor(n){this.crossSourceCollisions=n,this.maxGroupID=0,this.collisionGroups={}}get(n){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[n]){const a=++this.maxGroupID;this.collisionGroups[n]={ID:a,predicate:h=>h.collisionGroupID===a}}return this.collisionGroups[n]}}function Xu(_,n,a,h,f){const{horizontalAlign:b,verticalAlign:E}=c.aP(_);return new c.P(-(b-.5)*n+h[0]*f,-(E-.5)*a+h[1]*f)}class Mp{constructor(n,a,h,f,b){this.transform=n.clone(),this.terrain=a,this.collisionIndex=new Ig(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=h,this.retainedQueryData={},this.collisionGroups=new kg(f),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=b,b&&(b.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(n){const a=this.terrain;return a?(h,f)=>a.getElevation(n,h,f):null}getBucketParts(n,a,h,f){const b=h.getBucket(a),E=h.latestFeatureIndex;if(!b||!E||a.id!==b.layerIds[0])return;const C=h.collisionBoxArray,k=b.layers[0].layout,O=b.layers[0].paint,F=Math.pow(2,this.transform.zoom-h.tileID.overscaledZ),U=h.tileSize/c.a6,$=h.tileID.toUnwrapped(),H=k.get("text-rotation-alignment")==="map",oe=c.aK(h,1,this.transform.zoom),de=c.aL(this.collisionIndex.transform,h,O.get("text-translate"),O.get("text-translate-anchor")),me=c.aL(this.collisionIndex.transform,h,O.get("icon-translate"),O.get("icon-translate-anchor")),pe=oi(H,this.transform,oe);this.retainedQueryData[b.bucketInstanceId]=new Rg(b.bucketInstanceId,E,b.sourceLayerIndex,b.index,h.tileID);const ge={bucket:b,layout:k,translationText:de,translationIcon:me,unwrappedTileID:$,pitchedLabelPlaneMatrix:pe,scale:F,textPixelRatio:U,holdingForFade:h.holdingForSymbolFade(),collisionBoxArray:C,partiallyEvaluatedTextSize:c.aw(b.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(b.sourceID)};if(f)for(const we of b.sortKeyRanges){const{sortKey:ye,symbolInstanceStart:fe,symbolInstanceEnd:be}=we;n.push({sortKey:ye,symbolInstanceStart:fe,symbolInstanceEnd:be,parameters:ge})}else n.push({symbolInstanceStart:0,symbolInstanceEnd:b.symbolInstances.length,parameters:ge})}attemptAnchorPlacement(n,a,h,f,b,E,C,k,O,F,U,$,H,oe,de,me,pe,ge,we,ye){var fe,be,_e;const Ie=c.aM[n.textAnchor],je=[n.textOffset0,n.textOffset1],Ne=Xu(Ie,h,f,je,b),Xe=this.collisionIndex.placeCollisionBox(a,$,k,O,F,C,E,me,U.predicate,we,Ne,ye);if((!ge||this.collisionIndex.placeCollisionBox(ge,$,k,O,F,C,E,pe,U.predicate,we,Ne,ye).placeable)&&Xe.placeable){let He;if(!((fe=this.prevPlacement)===null||fe===void 0)&&fe.variableOffsets[H.crossTileID]&&(!((_e=(be=this.prevPlacement)===null||be===void 0?void 0:be.placements[H.crossTileID])===null||_e===void 0)&&_e.text)&&(He=this.prevPlacement.variableOffsets[H.crossTileID].anchor),H.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[H.crossTileID]={textOffset:je,width:h,height:f,anchor:Ie,textBoxScale:b,prevAnchor:He},this.markUsedJustification(oe,Ie,H,de),oe.allowVerticalPlacement&&(this.markUsedOrientation(oe,de,H),this.placedOrientations[H.crossTileID]=de),{shift:Ne,placedGlyphBoxes:Xe}}}placeLayerBucketPart(n,a,h){const{bucket:f,layout:b,translationText:E,translationIcon:C,unwrappedTileID:k,pitchedLabelPlaneMatrix:O,textPixelRatio:F,holdingForFade:U,collisionBoxArray:$,partiallyEvaluatedTextSize:H,collisionGroup:oe}=n.parameters,de=b.get("text-optional"),me=b.get("icon-optional"),pe=c.aN(b,"text-overlap","text-allow-overlap"),ge=pe==="always",we=c.aN(b,"icon-overlap","icon-allow-overlap"),ye=we==="always",fe=b.get("text-rotation-alignment")==="map",be=b.get("text-pitch-alignment")==="map",_e=b.get("icon-text-fit")!=="none",Ie=b.get("symbol-z-order")==="viewport-y",je=ge&&(ye||!f.hasIconData()||me),Ne=ye&&(ge||!f.hasTextData()||de);!f.collisionArrays&&$&&f.deserializeCollisionBoxes($);const Xe=this.retainedQueryData[f.bucketInstanceId].tileID,He=this._getTerrainElevationFunc(Xe),pt=this.transform.getFastPathSimpleProjectionMatrix(Xe),rt=(Ge,lt,gt)=>{var Kt,Rr;if(a[Ge.crossTileID])return;if(U)return void(this.placements[Ge.crossTileID]=new Ag(!1,!1,!1));let tr=!1,Lr=!1,Br=!0,Sn=null,Sr={box:null,placeable:!1,offscreen:null,occluded:!1},jn={placeable:!1},hn=null,Qr=null,Tn=null,ps=0,fs=0,ms=0;lt.textFeatureIndex?ps=lt.textFeatureIndex:Ge.useRuntimeCollisionCircles&&(ps=Ge.featureIndex),lt.verticalTextFeatureIndex&&(fs=lt.verticalTextFeatureIndex);const En=lt.textBox;if(En){const fo=_r=>{let ur=c.ax.horizontal;if(f.allowVerticalPlacement&&!_r&&this.prevPlacement){const Vr=this.prevPlacement.placedOrientations[Ge.crossTileID];Vr&&(this.placedOrientations[Ge.crossTileID]=Vr,ur=Vr,this.markUsedOrientation(f,ur,Ge))}return ur},mo=(_r,ur)=>{if(f.allowVerticalPlacement&&Ge.numVerticalGlyphVertices>0&&lt.verticalTextBox){for(const Vr of f.writingModes)if(Vr===c.ax.vertical?(Sr=ur(),jn=Sr):Sr=_r(),Sr==null?void 0:Sr.placeable)break}else Sr=_r()},ui=Ge.textAnchorOffsetStartIndex,Pi=Ge.textAnchorOffsetEndIndex;if(Pi===ui){const _r=(ur,Vr)=>{const vr=this.collisionIndex.placeCollisionBox(ur,pe,F,Xe,k,be,fe,E,oe.predicate,He,void 0,pt);return vr!=null&&vr.placeable&&(this.markUsedOrientation(f,Vr,Ge),this.placedOrientations[Ge.crossTileID]=Vr),vr};mo(()=>_r(En,c.ax.horizontal),()=>{const ur=lt.verticalTextBox;return f.allowVerticalPlacement&&Ge.numVerticalGlyphVertices>0&&ur?_r(ur,c.ax.vertical):{box:null,offscreen:null}}),fo(Sr==null?void 0:Sr.placeable)}else{let _r=c.aM[(Rr=(Kt=this.prevPlacement)===null||Kt===void 0?void 0:Kt.variableOffsets[Ge.crossTileID])===null||Rr===void 0?void 0:Rr.anchor];const ur=(vr,la,Dd)=>{const jo=vr.x2-vr.x1,Tf=vr.y2-vr.y1,Cy=Ge.textBoxScale,Ef=_e&&we==="never"?la:null;let ys=null,_s=pe==="never"?1:2,vs="never";_r&&_s++;for(let Pf=0;Pf<_s;Pf++){for(let Cf=ui;Cf<Pi;Cf++){const Ld=f.textAnchorOffsets.get(Cf);if(_r&&Ld.textAnchor!==_r)continue;const zd=this.attemptAnchorPlacement(Ld,vr,jo,Tf,Cy,fe,be,F,Xe,k,oe,vs,Ge,f,Dd,E,C,Ef,He);if(zd&&(ys=zd.placedGlyphBoxes,ys==null?void 0:ys.placeable))return tr=!0,Sn=zd.shift,ys}_r?_r=null:vs=pe}return h&&!ys&&(ys={box:this.collisionIndex.placeCollisionBox(En,"always",F,Xe,k,be,fe,E,oe.predicate,He,void 0,pt).box,offscreen:!1,placeable:!1,occluded:!1}),ys};mo(()=>ur(En,lt.iconBox,c.ax.horizontal),()=>{const vr=lt.verticalTextBox;return f.allowVerticalPlacement&&!(Sr!=null&&Sr.placeable)&&Ge.numVerticalGlyphVertices>0&&vr?ur(vr,lt.verticalIconBox,c.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Sr&&(tr=Sr.placeable,Br=Sr.offscreen);const Vr=fo(Sr==null?void 0:Sr.placeable);if(!tr&&this.prevPlacement){const vr=this.prevPlacement.variableOffsets[Ge.crossTileID];vr&&(this.variableOffsets[Ge.crossTileID]=vr,this.markUsedJustification(f,vr.anchor,Ge,Vr))}}}if(hn=Sr,tr=hn==null?void 0:hn.placeable,Br=hn==null?void 0:hn.offscreen,Ge.useRuntimeCollisionCircles&&Ge.centerJustifiedTextSymbolIndex>=0){const fo=f.text.placedSymbolArray.get(Ge.centerJustifiedTextSymbolIndex),mo=c.ay(f.textSizeData,H,fo),ui=b.get("text-padding");Qr=this.collisionIndex.placeCollisionCircles(pe,fo,f.lineVertexArray,f.glyphOffsetArray,mo,k,O,h,be,oe.predicate,Ge.collisionCircleDiameter,ui,E,He),Qr.circles.length&&Qr.collisionDetected&&!h&&c.w("Collisions detected, but collision boxes are not shown"),tr=ge||Qr.circles.length>0&&!Qr.collisionDetected,Br&&(Br=Qr.offscreen)}if(lt.iconFeatureIndex&&(ms=lt.iconFeatureIndex),lt.iconBox){const fo=mo=>
458this.collisionIndex.placeCollisionBox(mo,we,F,Xe,k,be,fe,C,oe.predicate,He,_e&&Sn?Sn:void 0,pt);jn&&jn.placeable&&lt.verticalIconBox?(Tn=fo(lt.verticalIconBox),Lr=Tn.placeable):(Tn=fo(lt.iconBox),Lr=Tn.placeable),Br&&(Br=Tn.offscreen)}const Fo=de||Ge.numHorizontalGlyphVertices===0&&Ge.numVerticalGlyphVertices===0,gs=me||Ge.numIconVertices===0;Fo||gs?gs?Fo||Lr&&(Lr=tr):tr=Lr&&tr:Lr=tr=Lr&&tr;const kd=Lr&&Tn.placeable;if(tr&&hn.placeable&&this.collisionIndex.insertCollisionBox(hn.box,pe,b.get("text-ignore-placement"),f.bucketInstanceId,jn&&jn.placeable&&fs?fs:ps,oe.ID),kd&&this.collisionIndex.insertCollisionBox(Tn.box,we,b.get("icon-ignore-placement"),f.bucketInstanceId,ms,oe.ID),Qr&&tr&&this.collisionIndex.insertCollisionCircles(Qr.circles,pe,b.get("text-ignore-placement"),f.bucketInstanceId,ps,oe.ID),h&&this.storeCollisionData(f.bucketInstanceId,gt,lt,hn,Tn,Qr),Ge.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(f.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Ge.crossTileID]=new Ag((tr||je)&&!(hn!=null&&hn.occluded),(Lr||Ne)&&!(Tn!=null&&Tn.occluded),Br||f.justReloaded),a[Ge.crossTileID]=!0};if(Ie){if(n.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const Ge=f.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let lt=Ge.length-1;lt>=0;--lt){const gt=Ge[lt];rt(f.symbolInstances.get(gt),f.collisionArrays[gt],gt)}}else for(let Ge=n.symbolInstanceStart;Ge<n.symbolInstanceEnd;Ge++)rt(f.symbolInstances.get(Ge),f.collisionArrays[Ge],Ge);f.justReloaded=!1}storeCollisionData(n,a,h,f,b,E){if(h.textBox||h.iconBox){let C,k;this.collisionBoxArrays.has(n)?C=this.collisionBoxArrays.get(n):(C=new Map,this.collisionBoxArrays.set(n,C)),C.has(a)?k=C.get(a):(k={text:null,icon:null},C.set(a,k)),h.textBox&&(k.text=f.box),h.iconBox&&(k.icon=b.box)}if(E){let C=this.collisionCircleArrays[n];C===void 0&&(C=this.collisionCircleArrays[n]=[]);for(let k=0;k<E.circles.length;k+=4)C.push(E.circles[k+0]-wr),C.push(E.circles[k+1]-wr),C.push(E.circles[k+2]),C.push(E.collisionDetected?1:0)}}markUsedJustification(n,a,h,f){let b;b=f===c.ax.vertical?h.verticalPlacedTextSymbolIndex:{left:h.leftJustifiedTextSymbolIndex,center:h.centerJustifiedTextSymbolIndex,right:h.rightJustifiedTextSymbolIndex}[c.aO(a)];const E=[h.leftJustifiedTextSymbolIndex,h.centerJustifiedTextSymbolIndex,h.rightJustifiedTextSymbolIndex,h.verticalPlacedTextSymbolIndex];for(const C of E)C>=0&&(n.text.placedSymbolArray.get(C).crossTileID=b>=0&&C!==b?0:h.crossTileID)}markUsedOrientation(n,a,h){const f=a===c.ax.horizontal||a===c.ax.horizontalOnly?a:0,b=a===c.ax.vertical?a:0,E=[h.leftJustifiedTextSymbolIndex,h.centerJustifiedTextSymbolIndex,h.rightJustifiedTextSymbolIndex];for(const C of E)n.text.placedSymbolArray.get(C).placedOrientation=f;h.verticalPlacedTextSymbolIndex&&(n.text.placedSymbolArray.get(h.verticalPlacedTextSymbolIndex).placedOrientation=b)}commit(n){this.commitTime=n,this.zoomAtLastRecencyCheck=this.transform.zoom;const a=this.prevPlacement;let h=!1;this.prevZoomAdjustment=a?a.zoomAdjustment(this.transform.zoom):0;const f=a?a.symbolFadeChange(n):1,b=a?a.opacities:{},E=a?a.variableOffsets:{},C=a?a.placedOrientations:{};for(const k in this.placements){const O=this.placements[k],F=b[k];F?(this.opacities[k]=new bc(F,f,O.text,O.icon),h||(h=O.text!==F.text.placed),h||(h=O.icon!==F.icon.placed)):(this.opacities[k]=new bc(null,f,O.text,O.icon,O.skipFade),h||(h=O.text||O.icon))}for(const k in b){const O=b[k];if(!this.opacities[k]){const F=new bc(O,f,!1,!1);F.isHidden()||(this.opacities[k]=F,h||(h=O.text.placed),h||(h=O.icon.placed))}}for(const k in E)this.variableOffsets[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.variableOffsets[k]=E[k]);for(const k in C)this.placedOrientations[k]||!this.opacities[k]||this.opacities[k].isHidden()||(this.placedOrientations[k]=C[k]);if(a&&a.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");h?this.lastPlacementChangeTime=n:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=a?a.lastPlacementChangeTime:n)}updateLayerOpacities(n,a){const h={};for(const f of a){const b=f.getBucket(n);b&&f.latestFeatureIndex&&n.id===b.layerIds[0]&&this.updateBucketOpacities(b,f.tileID,h,f.collisionBoxArray)}}
vendor: 7,635 bytes, line 458
458updateBucketOpacities(n,a,h,f){n.hasTextData()&&(n.text.opacityVertexArray.clear(),n.text.hasVisibleVertices=!1),n.hasIconData()&&(n.icon.opacityVertexArray.clear(),n.icon.hasVisibleVertices=!1),n.hasIconCollisionBoxData()&&n.iconCollisionBox.collisionVertexArray.clear(),n.hasTextCollisionBoxData()&&n.textCollisionBox.collisionVertexArray.clear();const b=n.layers[0],E=b.layout,C=new bc(null,0,!1,!1,!0),k=E.get("text-allow-overlap"),O=E.get("icon-allow-overlap"),F=b._unevaluatedLayout.hasValue("text-variable-anchor")||b._unevaluatedLayout.hasValue("text-variable-anchor-offset"),U=E.get("text-rotation-alignment")==="map",$=E.get("text-pitch-alignment")==="map",H=E.get("icon-text-fit")!=="none",oe=new bc(null,0,k&&(O||!n.hasIconData()||E.get("icon-optional")),O&&(k||!n.hasTextData()||E.get("text-optional")),!0);!n.collisionArrays&&f&&(n.hasIconCollisionBoxData()||n.hasTextCollisionBoxData())&&n.deserializeCollisionBoxes(f);const de=(pe,ge,we)=>{for(let ye=0;ye<ge/4;ye++)pe.opacityVertexArray.emplaceBack(we);pe.hasVisibleVertices||(pe.hasVisibleVertices=we!==Sc)},me=this.collisionBoxArrays.get(n.bucketInstanceId);for(let pe=0;pe<n.symbolInstances.length;pe++){const ge=n.symbolInstances.get(pe),{numHorizontalGlyphVertices:we,numVerticalGlyphVertices:ye,crossTileID:fe}=ge;let be=this.opacities[fe];h[fe]?be=C:be||(be=oe,this.opacities[fe]=be),h[fe]=!0;const _e=ge.numIconVertices>0,Ie=this.placedOrientations[ge.crossTileID],je=Ie===c.ax.vertical,Ne=Ie===c.ax.horizontal||Ie===c.ax.horizontalOnly;if(we>0||ye>0){const He=Dp(be.text);de(n.text,we,je?Sc:He),de(n.text,ye,Ne?Sc:He);const pt=be.text.isHidden(),rt=[ge.rightJustifiedTextSymbolIndex,ge.centerJustifiedTextSymbolIndex,ge.leftJustifiedTextSymbolIndex];for(const gt of rt)gt>=0&&(n.text.placedSymbolArray.get(gt).hidden=pt||je?1:0);ge.verticalPlacedTextSymbolIndex>=0&&(n.text.placedSymbolArray.get(ge.verticalPlacedTextSymbolIndex).hidden=pt||Ne?1:0);const Ge=this.variableOffsets[ge.crossTileID];Ge&&this.markUsedJustification(n,Ge.anchor,ge,Ie);const lt=this.placedOrientations[ge.crossTileID];lt&&(this.markUsedJustification(n,"left",ge,lt),this.markUsedOrientation(n,lt,ge))}if(_e){const He=Dp(be.icon),pt=!(H&&ge.verticalPlacedIconSymbolIndex&&je);ge.placedIconSymbolIndex>=0&&(de(n.icon,ge.numIconVertices,pt?He:Sc),n.icon.placedSymbolArray.get(ge.placedIconSymbolIndex).hidden=be.icon.isHidden()),ge.verticalPlacedIconSymbolIndex>=0&&(de(n.icon,ge.numVerticalIconVertices,pt?Sc:He),n.icon.placedSymbolArray.get(ge.verticalPlacedIconSymbolIndex).hidden=be.icon.isHidden())}const Xe=me!=null&&me.has(pe)?me.get(pe):{text:null,icon:null};if(n.hasIconCollisionBoxData()||n.hasTextCollisionBoxData()){const He=n.collisionArrays[pe];if(He){let pt=new c.P(0,0);if(He.textBox||He.verticalTextBox){let rt=!0;if(F){const Ge=this.variableOffsets[fe];Ge?(pt=Xu(Ge.anchor,Ge.width,Ge.height,Ge.textOffset,Ge.textBoxScale),U&&pt._rotate($?-this.transform.bearingInRadians:this.transform.bearingInRadians)):rt=!1}if(He.textBox||He.verticalTextBox){let Ge;He.textBox&&(Ge=je),He.verticalTextBox&&(Ge=Ne),Ap(n.textCollisionBox.collisionVertexArray,be.text.placed,!rt||Ge,Xe.text,pt.x,pt.y)}}if(He.iconBox||He.verticalIconBox){const rt=!!(!Ne&&He.verticalIconBox);let Ge;He.iconBox&&(Ge=rt),He.verticalIconBox&&(Ge=!rt),Ap(n.iconCollisionBox.collisionVertexArray,be.icon.placed,Ge,Xe.icon,H?pt.x:0,H?pt.y:0)}}}}if(n.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[n.bucketInstanceId]&&(this.retainedQueryData[n.bucketInstanceId].featureSortOrder=n.featureSortOrder),n.hasTextData()&&n.text.opacityVertexBuffer&&n.text.opacityVertexBuffer.updateData(n.text.opacityVertexArray),n.hasIconData()&&n.icon.opacityVertexBuffer&&n.icon.opacityVertexBuffer.updateData(n.icon.opacityVertexArray),n.hasIconCollisionBoxData()&&n.iconCollisionBox.collisionVertexBuffer&&n.iconCollisionBox.collisionVertexBuffer.updateData(n.iconCollisionBox.collisionVertexArray),n.hasTextCollisionBoxData()&&n.textCollisionBox.collisionVertexBuffer&&n.textCollisionBox.collisionVertexBuffer.updateData(n.textCollisionBox.collisionVertexArray),n.text.opacityVertexArray.length!==n.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${n.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${n.text.layoutVertexArray.length}) / 4`);if(n.icon.opacityVertexArray.length!==n.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${n.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${n.icon.layoutVertexArray.length}) / 4`);n.bucketInstanceId in this.collisionCircleArrays&&(n.collisionCircleArray=this.collisionCircleArrays[n.bucketInstanceId],delete this.collisionCircleArrays[n.bucketInstanceId])}symbolFadeChange(n){return this.fadeDuration===0?1:(n-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(n){return Math.max(0,(this.transform.zoom-n)/1.5)}hasTransitions(n){return this.stale||n-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(n,a){const h=this.zoomAtLastRecencyCheck===a?1-this.zoomAdjustment(a):1;return this.zoomAtLastRecencyCheck=a,this.commitTime+this.fadeDuration*h>n}setStale(){this.stale=!0}}function Ap(_,n,a,h,f,b){h&&h.length!==0||(h=[0,0,0,0]);const E=h[0]-wr,C=h[1]-wr,k=h[2]-wr,O=h[3]-wr;_.emplaceBack(n?1:0,a?1:0,f||0,b||0,E,C),_.emplaceBack(n?1:0,a?1:0,f||0,b||0,k,C),_.emplaceBack(n?1:0,a?1:0,f||0,b||0,k,O),_.emplaceBack(n?1:0,a?1:0,f||0,b||0,E,O)}const Rp=Math.pow(2,25),kp=Math.pow(2,24),z0=Math.pow(2,17),wc=Math.pow(2,16),Ku=Math.pow(2,9),Dg=Math.pow(2,8),Za=Math.pow(2,1);function Dp(_){if(_.opacity===0&&!_.placed)return 0;if(_.opacity===1&&_.placed)return 4294967295;const n=_.placed?1:0,a=Math.floor(127*_.opacity);return a*Rp+n*kp+a*z0+n*wc+a*Ku+n*Dg+a*Za+n}const Sc=0;class as{constructor(n){this._sortAcrossTiles=n.layout.get("symbol-z-order")!=="viewport-y"&&!n.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(n,a,h,f,b){const E=this._bucketParts;for(;this._currentTileIndex<n.length;)if(a.getBucketParts(E,f,n[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,b())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,E.sort((C,k)=>C.sortKey-k.sortKey));this._currentPartIndex<E.length;)if(a.placeLayerBucketPart(E[this._currentPartIndex],this._seenCrossTileIDs,h),this._currentPartIndex++,b())return!0;return!1}}class Ha{constructor(n,a,h,f,b,E,C,k){this.placement=new Mp(n,a,E,C,k),this._currentPlacementIndex=h.length-1,this._forceFullPlacement=f,this._showCollisionBoxes=b,this._done=!1}isDone(){return this._done}continuePlacement(n,a,h){const f=Y(),b=()=>!this._forceFullPlacement&&Y()-f>2;for(;this._currentPlacementIndex>=0;){const E=a[n[this._currentPlacementIndex]],C=this.placement.collisionIndex.transform.zoom;if(c.aQ(E)&&E.layout&&(!E.minzoom||E.minzoom<=C)&&(!E.maxzoom||E.maxzoom>C)){if(this._inProgressLayer||(this._inProgressLayer=new as(E)),this._inProgressLayer.continuePlacement(h[E.source],this.placement,this._showCollisionBoxes,E,b))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(n){return this.placement.commit(n),this.placement}}const Rt=512/c.a6/2;class Lp{constructor(n,a,h){this.tileID=n,this.bucketInstanceId=h,this._symbolsByKey={};const f=new Map;for(let b=0;b<a.length;b++){const E=a.get(b),C=E.key,k=f.get(C);k?k.push(E):f.set(C,[E])}for(const[b,E]of f){const C={positions:E.map(k=>({x:Math.floor(k.anchorX*Rt),y:Math.floor(k.anchorY*Rt)})),crossTileIDs:E.map(k=>
458k.crossTileID)};if(C.positions.length>128){const k=new c.aR(C.positions.length,16,Uint16Array);for(const{x:O,y:F}of C.positions)k.add(O,F);k.finish(),delete C.positions,C.index=k}this._symbolsByKey[b]=C}}getScaledCoordinates(n,a){const{x:h,y:f,z:b}=this.tileID.canonical,{x:E,y:C,z:k}=a.canonical,O=Rt/Math.pow(2,k-b),F=(C*c.a6+n.anchorY)*O,U=f*c.a6*Rt;return{x:Math.floor((E*c.a6+n.anchorX)*O-h*c.a6*Rt),y:Math.floor(F-U)}}findMatches(n,a,h){const f=this.tileID.canonical.z<a.canonical.z?1:Math.pow(2,this.tileID.canonical.z-a.canonical.z);for(let b=0;b<n.length;b++){const E=n.get(b);if(E.crossTileID)continue;const C=this._symbolsByKey[E.key];if(!C)continue;const k=this.getScaledCoordinates(E,a);if(C.index){const O=C.index.range(k.x-f,k.y-f,k.x+f,k.y+f).sort();for(const F of O){const U=C.crossTileIDs[F];if(!h[U]){h[U]=!0,E.crossTileID=U;break}}}else if(C.positions)for(let O=0;O<C.positions.length;O++){const F=C.positions[O],U=C.crossTileIDs[O];if(Math.abs(F.x-k.x)<=f&&Math.abs(F.y-k.y)<=f&&!h[U]){h[U]=!0,E.crossTileID=U;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:n})=>n)}}class O0{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class zp{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(n){const a=Math.round((n-this.lng)/360);if(a!==0)for(const h in this.indexes){const f=this.indexes[h],b={};for(const E in f){const C=f[E];C.tileID=C.tileID.unwrapTo(C.tileID.wrap+a),b[C.tileID.key]=C}this.indexes[h]=b}this.lng=n}addBucket(n,a,h){var f,b,E;if(!((f=this.indexes[n.overscaledZ])===null||f===void 0)&&f[n.key]){if(this.indexes[n.overscaledZ][n.key].bucketInstanceId===a.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(n.overscaledZ,this.indexes[n.overscaledZ][n.key])}for(let k=0;k<a.symbolInstances.length;k++)a.symbolInstances.get(k).crossTileID=0;(b=this.usedCrossTileIDs)[E=n.overscaledZ]||(b[E]={});const C=this.usedCrossTileIDs[n.overscaledZ];for(const k in this.indexes){const O=this.indexes[k];if(Number(k)>n.overscaledZ)for(const F in O){const U=O[F];U.tileID.isChildOf(n)&&U.findMatches(a.symbolInstances,n,C)}else{const F=O[n.scaledTo(Number(k)).key];F&&F.findMatches(a.symbolInstances,n,C)}}for(let k=0;k<a.symbolInstances.length;k++){const O=a.symbolInstances.get(k);O.crossTileID||(O.crossTileID=h.generate(),C[O.crossTileID]=!0)}return this.indexes[n.overscaledZ]===void 0&&(this.indexes[n.overscaledZ]={}),this.indexes[n.overscaledZ][n.key]=new Lp(n,a.symbolInstances,a.bucketInstanceId),!0}removeBucketCrossTileIDs(n,a){for(const h of a.getCrossTileIDsLists())for(const f of h)delete this.usedCrossTileIDs[n][f]}removeStaleBuckets(n){let a=!1;for(const h in this.indexes){const f=this.indexes[h];for(const b in f)n[f[b].bucketInstanceId]||(this.removeBucketCrossTileIDs(h,f[b]),delete f[b],a=!0)}return a}}class Xn{constructor(){this.layerIndexes={},this.crossTileIDs=new O0,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(n,a,h){let f=this.layerIndexes[n.id];f===void 0&&(f=this.layerIndexes[n.id]=new zp);let b=!1;const E={};f.handleWrapJump(h);for(const C of a){const k=C.getBucket(n);n.id===(k==null?void 0:k.layerIds[0])&&(k.bucketInstanceId||(this.maxBucketInstanceId+=1,k.bucketInstanceId=this.maxBucketInstanceId),f.addBucket(C.tileID,k,this.crossTileIDs)&&(b=!0),E[k.bucketInstanceId]=!0)}return f.removeStaleBuckets(E)&&(b=!0),b}pruneUnusedLayers(n){const a={};for(const h of n)a[h]=!0;for(const h in this.layerIndexes)a[h]||delete this.layerIndexes[h]}}var wn="void main() {fragColor=vec4(1.0);}";const gr={prelude:Et(`#ifdef GL_ES
459precision mediump float;
460#else
461#if !defined(lowp)
462#define lowp
463#endif
464#if !defined(mediump)
465#define mediump
466#endif
467#if !defined(highp)
468#define highp
469#endif
470#endif
471out highp vec4 fragColor;`,`#ifdef GL_ES
472precision highp float;
473#else
474#if !defined(lowp)
475#define lowp
476#endif
477#if !defined(mediump)
478#define mediump
479#endif
480#if !defined(highp)
481#define highp
482#endif
483#endif
484vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
485);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);
485return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+      c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+    c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+    c
486);}
487#ifdef TERRAIN3D
488uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
489#endif
490const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
491#ifdef TERRAIN3D
492highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
493#else
494return 1.0;
495#endif
496}float calculate_visibility(vec4 pos) {
497#ifdef TERRAIN3D
498vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
499#else
500return 1.0;
501#endif
502}float ele(vec2 pos) {
503#ifdef TERRAIN3D
504vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
505#else
506return 0.0;
507#endif
508}float get_elevation(vec2 pos) {
509#ifdef TERRAIN3D
510#ifdef GLOBE
511if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
512#endif
513vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
514#else
515return 0.0;
516#endif
517}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:Et("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:Et("",`#define GLOBE_RADIUS 6371008.8
518uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
519);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); 
520if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
521);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:Et(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
522#ifdef OVERDRAW_INSPECTOR
523fragColor=vec4(1.0);
524#endif
525}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Et(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;
525uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
526#ifdef OVERDRAW_INSPECTOR
527fragColor=vec4(1.0);
528#endif
529}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Et(`in vec3 v_data;in float v_visibility;
530#pragma mapbox: define highp vec4 color
531#pragma mapbox: define mediump float radius
532#pragma mapbox: define lowp float blur
533#pragma mapbox: define lowp float opacity
534#pragma mapbox: define highp vec4 stroke_color
535#pragma mapbox: define mediump float stroke_width
536#pragma mapbox: define lowp float stroke_opacity
537void main() {
538#pragma mapbox: initialize highp vec4 color
539#pragma mapbox: initialize mediump float radius
540#pragma mapbox: initialize lowp float blur
541#pragma mapbox: initialize lowp float opacity
542#pragma mapbox: initialize highp vec4 stroke_color
543#pragma mapbox: initialize mediump float stroke_width
544#pragma mapbox: initialize lowp float stroke_opacity
545vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
546#ifdef OVERDRAW_INSPECTOR
547fragColor=vec4(1.0);
548#endif
549}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
550#pragma mapbox: define highp vec4 color
551#pragma mapbox: define mediump float radius
552#pragma mapbox: define lowp float blur
553#pragma mapbox: define lowp float opacity
554#pragma mapbox: define highp vec4 stroke_color
555#pragma mapbox: define mediump float stroke_width
556#pragma mapbox: define lowp float stroke_opacity
557void main(void) {
558#pragma mapbox: initialize highp vec4 color
559#pragma mapbox: initialize mediump float radius
560#pragma mapbox: initialize lowp float blur
561#pragma mapbox: initialize lowp float opacity
562#pragma mapbox: initialize highp vec4 stroke_color
563#pragma mapbox: initialize mediump float stroke_width
564#pragma mapbox: initialize lowp float stroke_opacity
565vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
566#ifdef GLOBE
567vec3 center_vector=projectToSphere(circle_center);
568#endif
569float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
570#ifdef GLOBE
571vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
572#else
573vec4 projected_center=projectTileWithElevation(circle_center,ele);
574#endif
575corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
576#ifdef GLOBE
577vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
578#else
579gl_Position=projectTileWithElevation(corner_position,ele);
580#endif
581} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Et(wn,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Et(`uniform highp float u_intensity;in vec2 v_extrude;
582#pragma mapbox: define highp float weight
583#define GAUSS_COEF 0.3989422804014327
584void main() {
585#pragma mapbox: initialize highp float weight
586float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
587#ifdef OVERDRAW_INSPECTOR
588fragColor=vec4(1.0);
589#endif
590}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
591#pragma mapbox: define highp float weight
592#pragma mapbox: define mediump float radius
593const highp float ZERO=1.0/255.0/16.0;
594#define GAUSS_COEF 0.3989422804014327
595void main(void) {
596#pragma mapbox: initialize highp float weight
597#pragma mapbox: initialize mediump float radius
598vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0);
599#ifdef GLOBE
600vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
601#else
602gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
603#endif
604}`),heatmapTexture:Et(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
605#ifdef OVERDRAW_INSPECTOR
606fragColor=vec4(0.0);
607#endif
608}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Et("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Et("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:Et(`#ifdef GL_ES
609precision highp float;
610#endif
611uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else
612{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0));
613#ifdef OVERDRAW_INSPECTOR
614fragColor=vec4(1.0);
615#endif
616}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:Et("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:Et(wn,`in vec2 a_pos;void main() {
617#ifdef GLOBE
618gl_Position=projectTileFor3D(a_pos,0.0);
619#else
620gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
621#endif
622}`),fill:Et(`#pragma mapbox: define highp vec4 color
623#pragma mapbox: define lowp float opacity
624void main() {
625#pragma mapbox: initialize highp vec4 color
626#pragma mapbox: initialize lowp float opacity
627fragColor=color*opacity;
628#ifdef OVERDRAW_INSPECTOR
629fragColor=vec4(1.0);
630#endif
631}`,`uniform vec2 u_fill_translate;in vec2 a_pos;
632#pragma mapbox: define highp vec4 color
633#pragma mapbox: define lowp float opacity
634void main() {
635#pragma mapbox: initialize highp vec4 color
636#pragma mapbox: initialize lowp float opacity
637gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:Et(`in vec2 v_pos;
638#ifdef GLOBE
639in float v_depth;
640#endif
641#pragma mapbox: define highp vec4 outline_color
642#pragma mapbox: define lowp float opacity
643void main() {
644#pragma mapbox: initialize highp vec4 outline_color
645#pragma mapbox: initialize lowp float opacity
646float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
647#ifdef GLOBE
648if (v_depth > 1.0) {discard;}
649#endif
650#ifdef OVERDRAW_INSPECTOR
651fragColor=vec4(1.0);
652#endif
653}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
654#ifdef GLOBE
655out float v_depth;
656#endif
657#pragma mapbox: define highp vec4 outline_color
658#pragma mapbox: define lowp float opacity
659void main() {
660#pragma mapbox: initialize highp vec4 outline_color
661#pragma mapbox: initialize lowp float opacity
662gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
663#ifdef GLOBE
664v_depth=gl_Position.z/gl_Position.w;
665#endif
666}`),fillOutlinePattern:Et(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
667#ifdef GLOBE
668in float v_depth;
669#endif
670#pragma mapbox: define lowp float opacity
671#pragma mapbox: define lowp vec4 pattern_from
672#pragma mapbox: define lowp vec4 pattern_to
673void main() {
674#pragma mapbox: initialize lowp float opacity
675#pragma mapbox: initialize mediump vec4 pattern_from
676#pragma mapbox: initialize mediump vec4 pattern_to
677vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
678#ifdef GLOBE
679if (v_depth > 1.0) {discard;}
680#endif
681#ifdef OVERDRAW_INSPECTOR
682fragColor=vec4(1.0);
683#endif
684}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
685#ifdef GLOBE
686out float v_depth;
687#endif
688#pragma mapbox: define lowp float opacity
689#pragma mapbox: define lowp vec4 pattern_from
690#pragma mapbox: define lowp vec4 pattern_to
691#pragma mapbox: define lowp float pixel_ratio_from
692#pragma mapbox: define lowp float pixel_ratio_to
693void main() {
694#pragma mapbox: initialize lowp float opacity
695#pragma mapbox: initialize mediump vec4 pattern_from
696#pragma mapbox: initialize mediump vec4 pattern_to
697#pragma mapbox: initialize lowp float pixel_ratio_from
698#pragma mapbox: initialize lowp float pixel_ratio_to
699vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
700#ifdef GLOBE
701v_depth=gl_Position.z/gl_Position.w;
702#endif
703}`),fillPattern:Et(`#ifdef GL_ES
704precision highp float;
705#endif
706uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
707#pragma mapbox: define lowp float opacity
708#pragma mapbox: define lowp vec4 pattern_from
709#pragma mapbox: define lowp vec4 pattern_to
710void main() {
711#pragma mapbox: initialize lowp float opacity
712#pragma mapbox: initialize mediump vec4 pattern_from
713#pragma mapbox: initialize mediump vec4 pattern_to
714vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
715#ifdef OVERDRAW_INSPECTOR
716fragColor=vec4(1.0);
717#endif
718}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
719#pragma mapbox: define lowp float opacity
720#pragma mapbox: define lowp vec4 pattern_from
721#pragma mapbox: define lowp vec4 pattern_to
722#pragma mapbox: define lowp float pixel_ratio_from
723#pragma mapbox: define lowp float pixel_ratio_to
724void main() {
725#pragma mapbox: initialize lowp float opacity
726#pragma mapbox: initialize mediump vec4 pattern_from
727#pragma mapbox: initialize mediump vec4 pattern_to
728#pragma mapbox: initialize lowp float pixel_ratio_from
729#pragma mapbox: initialize lowp float pixel_ratio_to
730vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_siz
730e_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Et(`in vec4 v_color;void main() {fragColor=v_color;
731#ifdef OVERDRAW_INSPECTOR
732fragColor=vec4(1.0);
733#endif
734}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
735#ifdef TERRAIN3D
736in vec2 a_centroid;
737#endif
738out vec4 v_color;
739#pragma mapbox: define highp float base
740#pragma mapbox: define highp float height
741#pragma mapbox: define highp vec4 color
742void main() {
743#pragma mapbox: initialize highp float base
744#pragma mapbox: initialize highp float height
745#pragma mapbox: initialize highp vec4 color
746vec3 normal=a_normal_ed.xyz;
747#ifdef TERRAIN3D
748float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
749#else
750float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
751#endif
752base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
753#ifdef GLOBE
754vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
755#else
756gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
757#endif
758float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
759#ifdef GLOBE
760mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
761#endif
762directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Et(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
763#pragma mapbox: define lowp float base
764#pragma mapbox: define lowp float height
765#pragma mapbox: define lowp vec4 pattern_from
766#pragma mapbox: define lowp vec4 pattern_to
767#pragma mapbox: define lowp float pixel_ratio_from
768#pragma mapbox: define lowp float pixel_ratio_to
769void main() {
770#pragma mapbox: initialize lowp float base
771#pragma mapbox: initialize lowp float height
772#pragma mapbox: initialize mediump vec4 pattern_from
773#pragma mapbox: initialize mediump vec4 pattern_to
774#pragma mapbox: initialize lowp float pixel_ratio_from
775#pragma mapbox: initialize lowp float pixel_ratio_to
776vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
777#ifdef OVERDRAW_INSPECTOR
778fragColor=vec4(1.0);
779#endif
780}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
781#ifdef TERRAIN3D
782in vec2 a_centroid;
783#endif
784#ifdef GLOBE
785out vec3 v_sphere_pos;
786#endif
787out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
788#pragma mapbox: define lowp float base
789#pragma mapbox: define lowp float height
790#pragma mapbox: define lowp vec4 pattern_from
791#pragma mapbox: define lowp vec4 pattern_to
792#pragma mapbox: define lowp float pixel_ratio_from
793#pragma mapbox: define lowp float pixel_ratio_to
794void main() {
795#pragma mapbox: initialize lowp float base
796#pragma mapbox: initialize lowp float height
797#pragma mapbox: initialize mediump vec4 pattern_from
798#pragma mapbox: initialize mediump vec4 pattern_to
799#pragma mapbox: initialize lowp float pixel_ratio_from
800#pragma mapbox: initialize lowp float pixel_ratio_to
801vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
802#ifdef TERRAIN3D
803float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
804#else
805float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
806#endif
807base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
808#ifdef GLOBE
809vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
810#else
811gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
812#endif
813vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
814? a_pos
815: vec2(edgedistance,elevation*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Et(`#ifdef GL_ES
816precision highp float;
817#endif
818uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/p
818ow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);
819#ifdef OVERDRAW_INSPECTOR
820fragColor=vec4(1.0);
821#endif
822}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Et(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];
823#define PI 3.141592653589793
824#define STANDARD 0
825#define COMBINED 1
826#define IGOR 2
827#define MULTIDIRECTIONAL 3
828#define BASIC 4
829float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else
830{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else
831{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);}
832#ifdef OVERDRAW_INSPECTOR
833fragColor=vec4(1.0);
834#endif
835}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:Et(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
836#ifdef GLOBE
837in float v_depth;
838#endif
839#pragma mapbox: define highp vec4 color
840#pragma mapbox: define lowp float blur
841#pragma mapbox: define lowp float opacity
842void main() {
843#pragma mapbox: initialize highp vec4 color
844#pragma mapbox: initialize lowp float blur
845#pragma mapbox: initialize lowp float opacity
846float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);
847#ifdef GLOBE
848if (v_depth > 1.0) {discard;}
849#endif
850#ifdef OVERDRAW_INSPECTOR
851fragColor=vec4(1.0);
852#endif
853}`,`
854#define scale 0.015873016
855in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
856#ifdef GLOBE
857out float v_depth;
858#endif
859#pragma mapbox: define highp vec4 color
860#pragma mapbox: define lowp float blur
861#pragma mapbox: define lowp float opacity
862#pragma mapbox: define mediump float gapwidth
863#pragma mapbox: define lowp float offset
864#pragma mapbox: define mediump float width
865void main() {
866#pragma mapbox: initialize highp vec4 color
867#pragma mapbox: initialize lowp float blur
868#pragma mapbox: initialize lowp float opacity
869#pragma mapbox: initialize mediump float gapwidth
870#pragma mapbox: initialize lowp float offset
871#pragma mapbox: initialize mediump float width
872float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
872float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
873#ifdef GLOBE
874v_depth=gl_Position.z/gl_Position.w;
875#endif
876#ifdef TERRAIN3D
877v_gamma_scale=1.0;
878#else
879float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
880#endif
881v_width2=vec2(outset,inset);}`),lineGradient:Et(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
882#ifdef GLOBE
883in float v_depth;
884#endif
885#pragma mapbox: define lowp float blur
886#pragma mapbox: define lowp float opacity
887void main() {
888#pragma mapbox: initialize lowp float blur
889#pragma mapbox: initialize lowp float opacity
890float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
891#ifdef GLOBE
892if (v_depth > 1.0) {discard;}
893#endif
894#ifdef OVERDRAW_INSPECTOR
895fragColor=vec4(1.0);
896#endif
897}`,`
898#define scale 0.015873016
899in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
900#ifdef GLOBE
901out float v_depth;
902#endif
903#pragma mapbox: define lowp float blur
904#pragma mapbox: define lowp float opacity
905#pragma mapbox: define mediump float gapwidth
906#pragma mapbox: define lowp float offset
907#pragma mapbox: define mediump float width
908void main() {
909#pragma mapbox: initialize lowp float blur
910#pragma mapbox: initialize lowp float opacity
911#pragma mapbox: initialize mediump float gapwidth
912#pragma mapbox: initialize lowp float offset
913#pragma mapbox: initialize mediump float width
914float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
915#ifdef GLOBE
916v_depth=gl_Position.z/gl_Position.w;
917#endif
918#ifdef TERRAIN3D
919v_gamma_scale=1.0;
920#else
921float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
922#endif
923v_width2=vec2(outset,inset);}`),linePattern:Et(`#ifdef GL_ES
924precision highp float;
925#endif
926uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
927#ifdef GLOBE
928in float v_depth;
929#endif
930#pragma mapbox: define lowp vec4 pattern_from
931#pragma mapbox: define lowp vec4 pattern_to
932#pragma mapbox: define lowp float pixel_ratio_from
933#pragma mapbox: define lowp float pixel_ratio_to
934#pragma mapbox: define lowp float blur
935#pragma mapbox: define lowp float opacity
936void main() {
937#pragma mapbox: initialize mediump vec4 pattern_from
938#pragma mapbox: initialize mediump vec4 pattern_to
939#pragma mapbox: initialize lowp float pixel_ratio_from
940#pragma mapbox: initialize lowp float pixel_ratio_to
941#pragma mapbox: initialize lowp float blur
942#pragma mapbox: initialize lowp float opacity
943vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
944#ifdef GLOBE
945if (v_depth > 1.0) {discard;}
946#endif
947#ifdef OVERDRAW_INSPECTOR
948fragColor=vec4(1.0);
949#endif
950}`,`
951#define scale 0.015873016
952#define LINE_DISTANCE_SCALE 2.0
953in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
954#ifdef GLOBE
955out float v_depth;
956#endif
957#pragma mapbox: define lowp float blur
958#pragma mapbox: define lowp float opacity
959#pragma mapbox: define lowp float offset
960#pragma mapbox: define mediump float gapwidth
961#pragma mapbox: define mediump float width
962#pragma mapbox: define lowp float floorwidth
963#pragma mapbox: define lowp vec4 pattern_from
964#pragma mapbox: define lowp vec4 pattern_to
965#pragma mapbox: define lowp float pixel_ratio_from
966#pragma mapbox: define lowp float pixel_ratio_to
967void main() {
968#pragma mapbox: initialize lowp float blur
969#pragma mapbox: initialize lowp float opacity
970#pragma mapbox: initialize lowp float offset
971#pragma mapbox: initialize mediump float gapwidth
972#pragma mapbox: initialize mediump float width
973#pragma mapbox: initialize lowp float floorwidth
974#pragma mapbox: initialize mediump vec4 pattern_from
975#pragma mapbox: initialize mediump vec4 pattern_to
976#pragma mapbox: initialize lowp float pixel_ratio_from
977#pragma mapbox: initialize lowp float pixel_ratio_to
978float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);
978float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
979#ifdef GLOBE
980v_depth=gl_Position.z/gl_Position.w;
981#endif
982#ifdef TERRAIN3D
983v_gamma_scale=1.0;
984#else
985float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
986#endif
987v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Et(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
988#ifdef GLOBE
989in float v_depth;
990#endif
991#pragma mapbox: define highp vec4 color
992#pragma mapbox: define lowp float blur
993#pragma mapbox: define lowp float opacity
994#pragma mapbox: define mediump float width
995#pragma mapbox: define lowp float floorwidth
996#pragma mapbox: define mediump vec4 dasharray_from
997#pragma mapbox: define mediump vec4 dasharray_to
998void main() {
999#pragma mapbox: initialize highp vec4 color
1000#pragma mapbox: initialize lowp float blur
1001#pragma mapbox: initialize lowp float opacity
1002#pragma mapbox: initialize mediump float width
1003#pragma mapbox: initialize lowp float floorwidth
1004#pragma mapbox: initialize mediump vec4 dasharray_from
1005#pragma mapbox: initialize mediump vec4 dasharray_to
1006float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);
1006float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
1007#ifdef GLOBE
1008if (v_depth > 1.0) {discard;}
1009#endif
1010#ifdef OVERDRAW_INSPECTOR
1011fragColor=vec4(1.0);
1012#endif
1013}`,`
1014#define scale 0.015873016
1015#define LINE_DISTANCE_SCALE 2.0
1016in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
1017#ifdef GLOBE
1018out float v_depth;
1019#endif
1020#pragma mapbox: define highp vec4 color
1021#pragma mapbox: define lowp float blur
1022#pragma mapbox: define lowp float opacity
1023#pragma mapbox: define mediump float gapwidth
1024#pragma mapbox: define lowp float offset
1025#pragma mapbox: define mediump float width
1026#pragma mapbox: define lowp float floorwidth
1027#pragma mapbox: define mediump vec4 dasharray_from
1028#pragma mapbox: define mediump vec4 dasharray_to
1029void main() {
1030#pragma mapbox: initialize highp vec4 color
1031#pragma mapbox: initialize lowp float blur
1032#pragma mapbox: initialize lowp float opacity
1033#pragma mapbox: initialize mediump float gapwidth
1034#pragma mapbox: initialize lowp float offset
1035#pragma mapbox: initialize mediump float width
1036#pragma mapbox: initialize lowp float floorwidth
1037#pragma mapbox: initialize mediump vec4 dasharray_from
1038#pragma mapbox: initialize mediump vec4 dasharray_to
1039float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
1040#ifdef GLOBE
1041v_depth=gl_Position.z/gl_Position.w;
1042#endif
1043#ifdef TERRAIN3D
1044v_gamma_scale=1.0;
1045#else
1046float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
1047#endif
1048float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:Et(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv;
1049#ifdef GLOBE
1050in float v_depth;
1051#endif
1052#pragma mapbox: define lowp float blur
1053#pragma mapbox: define lowp float opacity
1054#pragma mapbox: define mediump float width
1055#pragma mapbox: define lowp float floorwidth
1056#pragma mapbox: define mediump vec4 dasharray_from
1057#pragma mapbox: define mediump vec4 dasharray_to
1058void main() {
1059#pragma mapbox: initialize lowp float blur
1060#pragma mapbox: initialize lowp float opacity
1061#pragma mapbox: initialize mediump float width
1062#pragma mapbox: initialize lowp float floorwidth
1063#pragma mapbox: initialize mediump vec4 dasharray_from
1064#pragma mapbox: initialize mediump vec4 dasharray_to
1065float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);
1065float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity);
1066#ifdef GLOBE
1067if (v_depth > 1.0) {discard;}
1068#endif
1069#ifdef OVERDRAW_INSPECTOR
1070fragColor=vec4(1.0);
1071#endif
1072}`,`
1073#define scale 0.015873016
1074#define LINE_DISTANCE_SCALE 2.0
1075in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b;
1076#ifdef GLOBE
1077out float v_depth;
1078#endif
1079#pragma mapbox: define lowp float blur
1080#pragma mapbox: define lowp float opacity
1081#pragma mapbox: define mediump float gapwidth
1082#pragma mapbox: define lowp float offset
1083#pragma mapbox: define mediump float width
1084#pragma mapbox: define lowp float floorwidth
1085#pragma mapbox: define mediump vec4 dasharray_from
1086#pragma mapbox: define mediump vec4 dasharray_to
1087void main() {
1088#pragma mapbox: initialize lowp float blur
1089#pragma mapbox: initialize lowp float opacity
1090#pragma mapbox: initialize mediump float gapwidth
1091#pragma mapbox: initialize lowp float offset
1092#pragma mapbox: initialize mediump float width
1093#pragma mapbox: initialize lowp float floorwidth
1094#pragma mapbox: initialize mediump vec4 dasharray_from
1095#pragma mapbox: initialize mediump vec4 dasharray_to
1096float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
1097#ifdef GLOBE
1098v_depth=gl_Position.z/gl_Position.w;
1099#endif
1100#ifdef TERRAIN3D
1101v_gamma_scale=1.0;
1102#else
1103float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
1104#endif
1105float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:Et(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture(u_image0,v_pos0);vec4 color1=texture(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
1106#ifdef OVERDRAW_INSPECTOR
1107fragColor=vec4(1.0);
1108#endif
1109}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
1110#ifdef GLOBE
1111if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
1112#endif
1113v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:Et(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity;
1114#ifdef OVERDRAW_INSPECTOR
1115fragColor=vec4(1.0);
1116#endif
1117}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_opacity;
1118#pragma mapbox: define lowp float opacity
1119void main() {
1120#pragma mapbox: initialize lowp float opacity
1121vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
1122camera_to_anchor_distance/u_camera_to_center_distance :
1123u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
1124#ifdef GLOBE
1125if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
1126#endif
1127vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:Et(`#define SDF_PX 8.0
1128uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1;
1129#pragma mapbox: define highp vec4 fill_color
1130#pragma mapbox: define highp vec4 halo_color
1131#pragma mapbox: define lowp float halo_width
1132#pragma mapbox: define lowp float halo_blur
1133void main() {
1134#pragma mapbox: initialize highp vec4 fill_color
1135#pragma mapbox: initialize highp vec4 halo_color
1136#pragma mapbox: initialize lowp float halo_width
1137#pragma mapbox: initialize lowp float halo_blur
1138float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;}
1139#ifdef OVERDRAW_INSPECTOR
1140fragColor=vec4(1.0);
1141#endif
1142}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
1143#pragma mapbox: define highp vec4 fill_color
1144#pragma mapbox: define highp vec4 halo_color
1145#pragma mapbox: define lowp float opacity
1146#pragma mapbox: define lowp float halo_width
1147#pragma mapbox: define lowp float halo_blur
1148void main() {
1149#pragma mapbox: initialize highp vec4 fill_color
1150#pragma mapbox: initialize highp vec4 halo_color
1151#pragma mapbox: initialize lowp float opacity
1152#pragma mapbox: initialize lowp float halo_width
1153#pragma mapbox: initialize lowp float halo_blur
1154vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
1155camera_to_anchor_distance/u_camera_to_center_distance :
1156u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
1157#ifdef GLOBE
1158if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
1159#endif
1160vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:Et(`#define SDF_PX 8.0
1161#define SDF 1.0
1162#define ICON 0.0
1163uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1;
1164#pragma mapbox: define highp vec4 fill_color
1165#pragma mapbox: define highp vec4 halo_color
1166#pragma mapbox: define lowp float halo_width
1167#pragma mapbox: define lowp float halo_blur
1168void main() {
1169#pragma mapbox: initialize highp vec4 fill_color
1170#pragma mapbox: initialize highp vec4 halo_color
1171#pragma mapbox: initialize lowp float halo_width
1172#pragma mapbox: initialize lowp float halo_blur
1173float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;
1173fragColor=texture(u_texture_icon,tex_icon)*total_opacity;
1174#ifdef OVERDRAW_INSPECTOR
1175fragColor=vec4(1.0);
1176#endif
1177return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;}
1178#ifdef OVERDRAW_INSPECTOR
1179fragColor=vec4(1.0);
1180#endif
1181}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
1182#pragma mapbox: define highp vec4 fill_color
1183#pragma mapbox: define highp vec4 halo_color
1184#pragma mapbox: define lowp float opacity
1185#pragma mapbox: define lowp float halo_width
1186#pragma mapbox: define lowp float halo_blur
1187void main() {
1188#pragma mapbox: initialize highp vec4 fill_color
1189#pragma mapbox: initialize highp vec4 halo_color
1190#pragma mapbox: initialize lowp float opacity
1191#pragma mapbox: initialize lowp float halo_width
1192#pragma mapbox: initialize lowp float halo_blur
1193vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
1194camera_to_anchor_distance/u_camera_to_center_distance :
1195u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
1196#ifdef GLOBE
1197if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
1198#endif
1199vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:Et("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
1199float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Et("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Et("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:Et("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:Et(`#ifdef GL_ES
1200precision highp float;
1201#endif
1202in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
1203);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:Et("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};
vendor: 11,025 bytes, lines 1203-1252
1203function Et(_,n){const a=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,h=n.match(/in ([\w]+) ([\w]+)/g),f=_.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),b=n.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),E=b?b.concat(f):f,C={};return{fragmentSource:_=_.replace(a,(k,O,F,U,$)=>(C[$]=!0,O==="define"?`
1204#ifndef HAS_UNIFORM_u_${$}
1205in ${F} ${U} ${$};
1206#else
1207uniform ${F} ${U} u_${$};
1208#endif
1209`:`
1210#ifdef HAS_UNIFORM_u_${$}
1211    ${F} ${U} ${$} = u_${$};
1212#endif
1213`)),vertexSource:n=n.replace(a,(k,O,F,U,$)=>{const H=U==="float"?"vec2":"vec4",oe=$.match(/color/)?"color":H;return C[$]?O==="define"?`
1214#ifndef HAS_UNIFORM_u_${$}
1215uniform lowp float u_${$}_t;
1216in ${F} ${H} a_${$};
1217out ${F} ${U} ${$};
1218#else
1219uniform ${F} ${U} u_${$};
1220#endif
1221`:oe==="vec4"?`
1222#ifndef HAS_UNIFORM_u_${$}
1223    ${$} = a_${$};
1224#else
1225    ${F} ${U} ${$} = u_${$};
1226#endif
1227`:`
1228#ifndef HAS_UNIFORM_u_${$}
1229    ${$} = unpack_mix_${oe}(a_${$}, u_${$}_t);
1230#else
1231    ${F} ${U} ${$} = u_${$};
1232#endif
1233`:O==="define"?`
1234#ifndef HAS_UNIFORM_u_${$}
1235uniform lowp float u_${$}_t;
1236in ${F} ${H} a_${$};
1237#else
1238uniform ${F} ${U} u_${$};
1239#endif
1240`:oe==="vec4"?`
1241#ifndef HAS_UNIFORM_u_${$}
1242    ${F} ${U} ${$} = a_${$};
1243#else
1244    ${F} ${U} ${$} = u_${$};
1245#endif
1246`:`
1247#ifndef HAS_UNIFORM_u_${$}
1248    ${F} ${U} ${$} = unpack_mix_${oe}(a_${$}, u_${$}_t);
1249#else
1250    ${F} ${U} ${$} = u_${$};
1251#endif
1252`}),staticAttributes:h,staticUniforms:E}}class nr{constructor(n,a,h){this.vertexBuffer=n,this.indexBuffer=a,this.segments=h}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var ls=c.aS([{name:"a_pos",type:"Int16",components:2}]);const zn="#define PROJECTION_MERCATOR",si="mercator";class On{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return si}get shaderDefine(){return zn}get shaderPreludeCode(){return gr.projectionMercator}get vertexShaderPreludeCode(){return gr.projectionMercator.vertexSource}get subdivisionGranularity(){return c.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(n){}getMeshFromTileID(n,a,h,f,b){if(this._cachedMesh)return this._cachedMesh;const E=new c.aU;E.emplaceBack(0,0),E.emplaceBack(c.a6,0),E.emplaceBack(0,c.a6),E.emplaceBack(c.a6,c.a6);const C=n.createVertexBuffer(E,ls.members),k=c.aV.simpleSegment(0,0,4,2),O=new c.aW;O.emplaceBack(1,0,2),O.emplaceBack(1,2,3);const F=n.createIndexBuffer(O);return this._cachedMesh=new nr(C,F,k),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(n){}}class Xa{constructor(n=0,a=0,h=0,f=0){if(isNaN(n)||n<0||isNaN(a)||a<0||isNaN(h)||h<0||isNaN(f)||f<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=n,this.bottom=a,this.left=h,this.right=f}interpolate(n,a,h){return a.top!=null&&n.top!=null&&(this.top=c.H.number(n.top,a.top,h)),a.bottom!=null&&n.bottom!=null&&(this.bottom=c.H.number(n.bottom,a.bottom,h)),a.left!=null&&n.left!=null&&(this.left=c.H.number(n.left,a.left,h)),a.right!=null&&n.right!=null&&(this.right=c.H.number(n.right,a.right,h)),this}getCenter(n,a){const h=c.al((this.left+n-this.right)/2,0,n),f=c.al((this.top+a-this.bottom)/2,0,a);return new c.P(h,f)}equals(n){return this.top===n.top&&this.bottom===n.bottom&&this.left===n.left&&this.right===n.right}clone(){return new Xa(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function cs(_,n){if(!_.renderWorldCopies||_.lngRange)return;const a=n.lng-_.center.lng;n.lng+=a>180?-360:a<-180?360:0}function Mr(_){return Math.max(0,Math.floor(_))}class qs{constructor(n,a){var h;this.applyConstrain=(f,b)=>this._constrainOverride!==null?this._constrainOverride(f,b):this._callbacks.defaultConstrain(f,b),this._callbacks=n,this._tileSize=512,this._renderWorldCopies=(a==null?void 0:a.renderWorldCopies)===void 0||!!(a!=null&&a.renderWorldCopies),this._minZoom=(a==null?void 0:a.minZoom)||0,this._maxZoom=(a==null?void 0:a.maxZoom)||22,this._minPitch=(a==null?void 0:a.minPitch)==null?0:a==null?void 0:a.minPitch,this._maxPitch=(a==null?void 0:a.maxPitch)==null?60:a==null?void 0:a.maxPitch,this._constrainOverride=(h=a==null?void 0:a.constrainOverride)!==null&&h!==void 0?h:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new c.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=Mr(this._zoom),this._scale=c.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Xa,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(n,a,h){this._constrainOverride=n.constrainOverride,this._latRange=n.latRange,this._lngRange=n.lngRange,this._width=n.width,this._height=n.height,this._center=n.center,this._elevation=n.elevation,this._minElevationForCurrentTile=n.minElevationForCurrentTile,this._zoom=n.zoom,this._tileZoom=Mr(this._zoom),this._scale=c.ao(this._zoom),this._bearingInRadians=n.bearingInRadians,this._fovInRadians=n.fovInRadians,this._pitchInRadians=n.pitchInRadians,this._rollInRadians=n.rollInRadians,this._unmodified=n.unmodified,this._edgeInsets=new Xa(n.padding.top,n.padding.bottom,n.padding.left,n.padding.right),this._minZoom=n.minZoom,this._maxZoom=n.maxZoom,this._minPitch=n.minPitch,this._maxPitch=n.maxPitch,this._renderWorldCopies=n.renderWorldCopies,this._cameraToCenterDistance=n.cameraToCenterDistance,this._nearZ=n.nearZ,this._farZ=n.farZ,this._autoCalculateNearFarZ=!h&&n.autoCalculateNearFarZ,a&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(n){this._minElevationForCurrentTile=n}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(n){this._minZoom!==n&&(this._minZoom=n,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(n){this._maxZoom!==n&&(this._maxZoom=n,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(n){this._minPitch!==n&&(this._minPitch=n,this.setPitch(Math.max(this.pitch,n)))}get maxPitch(){return this._maxPitch}setMaxPitch(n){this._maxPitch!==n&&(this._maxPitch=n,this.setPitch(Math.min(this.pitch,n)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(n){n===void 0?n=!0:n===null&&(n=!1),this._renderWorldCopies=n}get constrainOverride(){return this._constrainOverride}setConstrainOverride(n){n===void 0&&(n=null),this._constrainOverride!==n&&(this._constrainOverride=n,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new c.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(n){const a=c.X(n,-180,180)*Math.PI/180;var h,f,b,E,C,k,O,F,U;this._bearingInRadians!==a&&(this._unmodified=!1,this._bearingInRadians=a,this._calcMatrices(),this._rotationMatrix=L(),h=this._rotationMatrix,b=-this._bearingInRadians,E=(f=this._rotationMatrix)[0],C=f[1],k=f[2],O=f[3],F=Math.sin(b),U=Math.cos(b),h[0]=E*U+k*F,h[1]=C*U+O*F,h[2]=E*-F+k*U,h[3]=C*-F+O*U)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(n){const a=c.al(n,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==a&&(this._unmodified=!1,this._pitchInRadians=a,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(n){const a=n/180*Math.PI;this._rollInRadians!==a&&(this._unmodified=!1,this._rollInRadians=a,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return c.aX(this._fovInRadians)}setFov(n){n=c.al(n,.1,150),this.fov!==n&&(this._unmodified=!1,this._fovInRadians=c.an(n),this._calcMatrices())}get zoom(){return this._zoom}setZoom(n){const a=this.applyConstrain(this._center,n).zoom;this._zoom!==a&&(this._unmodified=!1,this._zoom=a,this._tileZoom=Math.max(0,Math.floor(a)),this._scale=c.ao(a),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(n){n.lat===this._center.lat&&n.lng===this._center.lng||(this._unmodified=!1,this._center=n,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(n){n!==this._elevation&&(this._elevation=n,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(n){this._edgeInsets.equals(n)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,n,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(n,a){this._autoCalculateNearFarZ=!1,this._nearZ=n,this._farZ=a,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(n){return this._edgeInsets.equals(n)}interpolatePadding(n,a,h){this._unmodified=!1,this._edgeInsets.interpolate(n,a,h),this.constrainInternal(),this._calcMatrices()}resize(n,a,h=!0){this._width=n,this._height=a,h&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var n,a;return((n=this._latRange)===null||n===void 0?void 0:n.length)!==2||((a=this._lngRange)===null||a===void 0?void 0:a.length)!==2?null:new bt([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(n){n?(this._lngRange=[n.getWest(),n.getEast()],this._latRange=[n.getSouth(),n.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-c.am,c.am])}getCameraQueryGeometry(n,a){if(a.length===1)return[a[0],n];{const{minX:h,minY:f,maxX:b,maxY:E}=c.a8.fromPoints(a).extend(n);return[new c.P(h,f),new c.P(b,f),new c.P(b,E),new c.P(h,E),new c.P(h,f)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const n=this._unmodified,{center:a,zoom:h}=this.applyConstrain(this.center,this.zoom);this.setCenter(a),this.setZoom(h),this._unmodified=n,this._constraining=!1}
1252_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let n=c.ap(new Float64Array(16));c.S(n,n,[this._width/2,-this._height/2,1]),c.Q(n,n,[1,-1,0]),this._clipSpaceToPixelsMatrix=n,n=c.ap(new Float64Array(16)),c.S(n,n,[1,-1,1]),c.Q(n,n,[-1,-1,0]),c.S(n,n,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=n,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(n,a,h,f){const b=h!==void 0?h:this.bearing,E=f=f!==void 0?f:this.pitch,{distanceToCenter:C,clampedElevation:k}=this._distanceToCenterFromAltElevationPitch(a,this.elevation,E),{x:O,y:F}=$u(E,b),U=c.a7.fromLngLat(n,a);let $,H,oe=c.aY(1,U.y),de=0;do{if(de+=1,de>10)break;H=C/oe,$=new c.a7(U.x+O*H,U.y+F*H),oe=1/$.meterInMercatorCoordinateUnits()}while(Math.abs(C-H*oe)>1e-12);return{center:$.toLngLat(),elevation:k,zoom:c.ar(this.height/2/Math.tan(this.fovInRadians/2)/H/this.tileSize)}}recalculateZoomAndCenter(n){if(this.elevation-n==0)return;const a=1/this.worldSize,h=c.aq(1,this.center.lat)*this.worldSize,f=c.a7.fromLngLat(this.center,this.elevation),b=f.x/a,E=f.y/a,C=f.z/a,k=this.pitch,O=this.bearing,{x:F,y:U,z:$}=$u(k,O),H=this.cameraToCenterDistance,oe=b+H*-F,de=E+H*-U,me=C+H*$,{distanceToCenter:pe,clampedElevation:ge}=this._distanceToCenterFromAltElevationPitch(me/h,n,k),we=pe*h,ye=new c.a7((oe+F*we)*a,(de+U*we)*a,0).toLngLat(),fe=c.aq(1,ye.lat),be=c.ar(this.height/2/Math.tan(this.fovInRadians/2)/pe/fe/this.tileSize);this._elevation=ge,this._center=ye,this.setZoom(be)}_distanceToCenterFromAltElevationPitch(n,a,h){const f=-Math.cos(c.an(h)),b=n-a;let E,C=a;return f*b>=0||Math.abs(f)<.1?(E=1e4,C=n+E*f):E=-b/f,{distanceToCenter:E,clampedElevation:C}}getCameraPoint(){const n=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new c.P(n*Math.sin(this.rollInRadians),n*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const n=c.aq(1,this.center.lat)*this.worldSize;return $a(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/n).toLngLat()}getMercatorTileCoordinates(n){if(!n)return[0,0,1,1];const a=n.canonical.z>=0?1<<n.canonical.z:Math.pow(2,n.canonical.z);return[n.canonical.x/a,n.canonical.y/a,1/a/c.a6,1/a/c.a6]}}class co{constructor(n,a){this.min=n,this.max=a,this.center=c.aZ([],c.a_([],this.min,this.max),.5)}quadrant(n){const a=[n%2==0,n<2],h=c.a$(this.min),f=c.a$(this.max);for(let b=0;b<a.length;b++)h[b]=a[b]?this.min[b]:this.center[b],f[b]=a[b]?this.center[b]:this.max[b];return f[2]=this.max[2],new co(h,f)}distanceX(n){return Math.max(Math.min(this.max[0],n[0]),this.min[0])-n[0]}distanceY(n){return Math.max(Math.min(this.max[1],n[1]),this.min[1])-n[1]}intersectsFrustum(n){let a=!0;for(const h of n.planes){const f=this.intersectsPlane(h);if(f===0)return 0;f===1&&(a=!1)}return a?2:n.aabb.min[0]>this.max[0]||n.aabb.min[1]>this.max[1]||n.aabb.min[2]>this.max[2]||n.aabb.max[0]<this.min[0]||n.aabb.max[1]<this.min[1]||n.aabb.max[2]<this.min[2]?0:1}intersectsPlane(n){let a=n[3],h=n[3];for(let f=0;f<3;f++)n[f]>0?(a+=n[f]*this.min[f],h+=n[f]*this.max[f]):(h+=n[f]*this.min[f],a+=n[f]*this.max[f]);return a>=0?2:h<0?0:1}}class Yu{distanceToTile2d(n,a,h,f){const b=f,E=b.distanceX([n,a]),C=b.distanceY([n,a]);return Math.hypot(E,C)}getWrap(n,a,h){return h}getTileBoundingVolume(n,a,h,f){var b,E;let C=0,k=0;if(f!=null&&f.terrain){const F=new c.a3(n.z,a,n.z,n.x,n.y),U=f.terrain.getMinMaxElevation(F);C=(b=U.minElevation)!==null&&b!==void 0?b:Math.min(0,h),k=(E=U.maxElevation)!==null&&E!==void 0?E:Math.max(0,h)}const O=1<<n.z;return new co([a+n.x/O,n.y/O,C],[a+(n.x+1)/O,(n.y+1)/O,k])}allowVariableZoom(n,a){const h=n.fov*(Math.abs(Math.cos(n.rollInRadians))*n.height+Math.abs(Math.sin(n.rollInRadians))*n.width)/n.height,f=c.al(78.5-h/2,0,60);return!!a.terrain||n.pitch>f}allowWorldCopies(){return!0}prepareNextFrame(){}}class Kn{constructor(n,a,h){this.points=n,this.planes=a,this.aabb=h}static fromInvProjectionMatrix(n,a=1,h=0,f,b){const E=b?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],C=Math.pow(2,h),k=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map($=>function(H,oe,de,me){const pe=c.aE([],H,oe),ge=1/pe[3]/de*me;return c.b4(pe,pe,[ge,ge,1/pe[3],ge])}($,n,a,C));f&&function($,H,oe,de){const me=de?4:0,pe=de?0:4;let ge=0;const we=[],ye=[];for(let _e=0;_e<4;_e++){const Ie=c.b0([],$[_e+pe],$[_e+me]),je=c.b5(Ie);c.aZ(Ie,Ie,1/je),we.push(je),ye.push(Ie)}for(let _e=0;_e<4;_e++){const Ie=c.b6($[_e+me],ye[_e],oe);ge=Ie!==null&&Ie>=0?Math.max(ge,Ie):Math.max(ge,we[_e])}const fe=function(_e,Ie){const je=c.b0([],_e[Ie[0]],_e[Ie[1]]),Ne=c.b0([],_e[Ie[2]],_e[Ie[1]]),Xe=[0,0,0,0];return c.b1(Xe,c.b2([],je,Ne)),Xe[3]=-c.b3(Xe,_e[Ie[0]]),Xe}($,H),be=function(_e,Ie){const je=c.b7(_e),Ne=c.b8([],_e,1/je),Xe=c.b0([],Ie,c.aZ([],Ne,c.b3(Ie,Ne))),He=c.b7(Xe);if(He>0){const pt=Math.sqrt(1-Ne[3]*Ne[3]),rt=c.aZ([],Ne,-Ne[3]),Ge=c.a_([],rt,c.aZ([],Xe,pt/He));return c.b9(Ie,Ge)}return null}(oe,fe);if(be!==null){const _e=be/c.b3(ye[0],fe);ge=Math.min(ge,_e)}for(let _e=0;_e<4;_e++){const Ie=Math.min(ge,we[_e]);$[_e+pe]=[$[_e+me][0]+ye[_e][0]*Ie,$[_e+me][1]+ye[_e][1]*Ie,$[_e+me][2]+ye[_e][2]*Ie,1]}}(k,E[0],f,b);const O=E.map($=>{const H=c.b0([],k[$[0]],k[$[1]]),oe=c.b0([],k[$[2]],k[$[1]]),de=c.b1([],c.b2([],H,oe)),me=-c.b3(de,k[$[1]]);return de.concat(me)}),F=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],U=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const $ of k)for(let H=0;H<3;
vendor: 13,647 bytes, line 1252
1252H++)F[H]=Math.min(F[H],$[H]),U[H]=Math.max(U[H],$[H]);return new Kn(k,O,new co(F,U))}}class Ws{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(n){this._helper.setMinZoom(n)}setMaxZoom(n){this._helper.setMaxZoom(n)}setMinPitch(n){this._helper.setMinPitch(n)}setMaxPitch(n){this._helper.setMaxPitch(n)}setRenderWorldCopies(n){this._helper.setRenderWorldCopies(n)}setBearing(n){this._helper.setBearing(n)}setPitch(n){this._helper.setPitch(n)}setRoll(n){this._helper.setRoll(n)}setFov(n){this._helper.setFov(n)}setZoom(n){this._helper.setZoom(n)}setCenter(n){this._helper.setCenter(n)}setElevation(n){this._helper.setElevation(n)}setMinElevationForCurrentTile(n){this._helper.setMinElevationForCurrentTile(n)}setPadding(n){this._helper.setPadding(n)}interpolatePadding(n,a,h){this._helper.interpolatePadding(n,a,h)}isPaddingEqual(n){return this._helper.isPaddingEqual(n)}resize(n,a,h=!0){this._helper.resize(n,a,h)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(n){this._helper.setMaxBounds(n)}setConstrainOverride(n){this._helper.setConstrainOverride(n)}overrideNearFarZ(n,a){this._helper.overrideNearFarZ(n,a)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(n){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),n)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(n,a){}constructor(n){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(a,h)=>{h=c.al(+h,this.minZoom,this.maxZoom);const f={center:new c.W(a.lng,a.lat),zoom:h};let b=this._helper._lngRange;if(!this._helper._renderWorldCopies&&b===null){const ye=179.9999999999;b=[-ye,ye]}const E=this.tileSize*c.ao(f.zoom);let C=0,k=E,O=0,F=E,U=0,$=0;const{x:H,y:oe}=this.size;if(this._helper._latRange){const ye=this._helper._latRange;C=c.Y(ye[1])*E,k=c.Y(ye[0])*E,k-C<oe&&(U=oe/(k-C))}b&&(O=c.X(c.Z(b[0])*E,0,E),F=c.X(c.Z(b[1])*E,0,E),F<O&&(F+=E),F-O<H&&($=H/(F-O)));const{x:de,y:me}=Vi(E,a);let pe,ge;const we=Math.max($||0,U||0);if(we){const ye=new c.P($?(F+O)/2:de,U?(k+C)/2:me);return f.center=Ua(E,ye).wrap(),f.zoom+=c.ar(we),f}if(this._helper._latRange){const ye=oe/2;me-ye<C&&(ge=C+ye),me+ye>k&&(ge=k-ye)}if(b){const ye=(O+F)/2;let fe=de;this._helper._renderWorldCopies&&(fe=c.X(de,ye-E/2,ye+E/2));const be=H/2;fe-be<O&&(pe=O+be),fe+be>F&&(pe=F-be)}if(pe!==void 0||ge!==void 0){const ye=new c.P(pe??de,ge??me);f.center=Ua(E,ye).wrap()}return f},this.applyConstrain=(a,h)=>this._helper.applyConstrain(a,h),this._helper=new qs({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(a,h)=>this.defaultConstrain(a,h)},n),this._coveringTilesDetailsProvider=new Yu}clone(){const n=new Ws;return n.apply(this,!1),n}apply(n,a,h){this._helper.apply(n,a,h)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(n){const a=[new c.ba(0,n)];if(this._helper._renderWorldCopies){const h=this.screenPointToMercatorCoordinate(new c.P(0,0)),f=this.screenPointToMercatorCoordinate(new c.P(this._helper._width,0)),b=this.screenPointToMercatorCoordinate(new c.P(this._helper._width,this._helper._height)),E=this.screenPointToMercatorCoordinate(new c.P(0,this._helper._height)),C=Math.floor(Math.min(h.x,f.x,b.x,E.x)),k=Math.floor(Math.max(h.x,f.x,b.x,E.x)),O=1;for(let F=C-O;F<=k+O;F++)F!==0&&a.push(new c.ba(F,n))}return a}getCameraFrustum(){return Kn.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(n){const a=this.screenPointToLocation(this.centerPoint,n),h=n?n.getElevationForLngLatZoom(a,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(h)}setLocationAtPoint(n,a){const h=c.aq(this.elevation,this.center.lat),f=this.screenPointToMercatorCoordinateAtZ(a,h),b=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,h),E=c.a7.fromLngLat(n),C=new c.a7(E.x-(f.x-b.x),E.y-(f.y-b.y));this.setCenter(C==null?void 0:C.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(n,a){return a?this.coordinatePoint(c.a7.fromLngLat(n),a.getElevationForLngLat(n,this),this._pixelMatrix3D):this.coordinatePoint(c.a7.fromLngLat(n))}screenPointToLocation(n,a){var h;return(h=this.screenPointToMercatorCoordinate(n,a))===null||h===void 0?void 0:h.toLngLat()}screenPointToMercatorCoordinate(n,a){if(a){const h=a.pointCoordinate(n);if(h!=null)return h}return this.screenPointToMercatorCoordinateAtZ(n)}screenPointToMercatorCoordinateAtZ(n,a){const h=a||0,f=[n.x,n.y,0,1],b=[n.x,n.y,1,1];c.aE(f,f,this._pixelMatrixInverse),c.aE(b,b,this._pixelMatrixInverse);const E=f[3],C=b[3],k=f[1]/E,O=b[1]/C,F=f[2]/E,U=b[2]/C,$=F===U?0:(h-F)/(U-F);return new c.a7(c.H.number(f[0]/E,b[0]/C,$)/this.worldSize,c.H.number(k,O,$)/this.worldSize,h)}coordinatePoint(n,a=0,h=this._pixelMatrix){const f=[n.x*this.worldSize,n.y*this.worldSize,a,1];return c.aE(f,f,h),new c.P(f[0]/f[3],f[1]/f[3])}getBounds(){const n=Math.max(0,this._helper._height/2-Bs(this));return new bt().extend(this.screenPointToLocation(new c.P(0,n))).extend(this.screenPointToLocation(new c.P(this._helper._width,n))).extend(this.screenPointToLocation(new c.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new c.P(0,this._helper._height)))}isPointOnMapSurface(n,a){return a?a.pointCoordinate(n)!=null:n.y>this.height/2-Bs(this)}calculatePosMatrix(n,a=!1,h){var f;const b=(f=n.key)!==null&&f!==void 0?f:c.bb(n.wrap,n.canonical.z,n.canonical.z,n.canonical.x,n.canonical.y),E=a?this._alignedPosMatrixCache:this._posMatrixCache;if(E.has(b)){const O=E.get(b);return h?O.f32:O.f64}const C=mc(n,this.worldSize);c.U(C,a?this._alignedProjMatrix:this._viewProjMatrix,C);const k={f64:C,f32:new Float32Array(C)};return E.set(b,k),h?k.f32:k.f64}calculateFogMatrix(n){const a=n.key,h=this._fogMatrixCacheF32;if(h.has(a))return h.get(a);const f=mc(n,this.worldSize);return c.U(f,this._fogMatrix,f),h.set(a,new Float32Array(f)),h.get(a)}calculateCenterFromCameraLngLatAlt(n,a,h,f){return this._helper.calculateCenterFromCameraLngLatAlt(n,a,h,f)}_calculateNearFarZIfNeeded(n,a,h){if(!this._helper.autoCalculateNearFarZ)return;const f=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),b=n-f*this._helper._pixelPerMeter/Math.cos(a),E=f<0?b:n,C=Math.PI/2+this.pitchInRadians,k=c.an(this.fov)*(Math.abs(Math.cos(c.an(this.roll)))*this.height+Math.abs(Math.sin(c.an(this.roll)))*this.width)/this.height*(.5+h.y/this.height),O=Math.sin(k)*E/Math.sin(c.al(Math.PI-C-k,.01,Math.PI-.01)),F=Bs(this),U=Math.atan(F/this._helper.cameraToCenterDistance),$=c.an(.75),H=U>$?2*U*(.5+h.y/(2*F)):$,oe=Math.sin(H)*E/Math.sin(c.al(Math.PI-C-H,.01,Math.PI-.01)),de=Math.min(O,oe);this._helper._farZ=1.01*(Math.cos(Math.PI/2-a)*de+E),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const n=this.centerOffset,a=Vi(this.worldSize,this.center),h=a.x,f=a.y;this._helper._pixelPerMeter=c.aq(1,this.center.lat)*this.worldSize;const b=c.an(Math.min(this.pitch,Ns)),E=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(b));let C;var k,O;this._calculateNearFarZIfNeeded(E,b,n),C=new Float64Array(16),c.bc(C,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(k=this._invProjMatrix)[0]=1/(O=C)[0],k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[5]=1/O[5],k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[10]=0,k[11]=1/O[14],k[12]=0,k[13]=0,k[14]=-1,k[15]=O[10]/O[14],C[8]=2*-n.x/this._helper._width,C[9]=2*n.y/this._helper._height,this._projectionMatrix=c.bd(C),c.S(C,C,[1,-1,1]),c.Q(C,C,[0,0,-this._helper.cameraToCenterDistance]),c.be(C,C,-this.rollInRadians),c.bf(C,C,this.pitchInRadians),c.be(C,C,-this.bearingInRadians),c.Q(C,C,[-h,-f,0]),this._mercatorMatrix=c.S([],C,[this.worldSize,this.worldSize,this.worldSize]),c.S(C,C,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=c.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,C),c.Q(C,C,[0,0,-this.elevation]),this._viewProjMatrix=C,this._invViewProjMatrix=c.bg([],C);const F=[0,0,-1,1];c.aE(F,F,this._invViewProjMatrix),this._cameraPosition=[F[0]/F[3],F[1]/F[3],F[2]/F[3]],this._fogMatrix=new Float64Array(16),c.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,E,this._helper._farZ),this._fogMatrix[8]=2*-n.x/this.width,this._fogMatrix[9]=2*n.y/this.height,c.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),c.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),c.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),c.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),c.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),c.Q(this._fogMatrix,this._fogMatrix,[-h,-f,0]),c.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),c.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=c.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,C);const U=this._helper._width%2/2,$=this._helper._height%2/2,H=Math.cos(this.bearingInRadians),oe=Math.sin(-this.bearingInRadians),de=h-Math.round(h)+H*U+oe*$,me=f-Math.round(f)+H*$+oe*U,pe=new Float64Array(C);if(c.Q(pe,pe,[de>.5?de-1:de,me>.5?me-1:me,0]),this._alignedProjMatrix=pe,C=c.bg(new Float64Array(16),this._pixelMatrix),!C)throw new Error("failed to invert matrix");this._pixelMatrixInverse=C,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const n=this.screenPointToMercatorCoordinate(new c.P(0,0)),a=[n.x*this.worldSize,n.y*this.worldSize,0,1];return c.aE(a,a,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const n=c.aq(1,this.center.lat)*this.worldSize;return $a(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/n).toLngLat()}lngLatToCameraDepth(n,a){const h=c.a7.fromLngLat(n),f=[h.x*this.worldSize,h.y*this.worldSize,a,1];return c.aE(f,f,this._viewProjMatrix),f[2]/f[3]}getProjectionData(n){const{overscaledTileID:a,aligned:h,applyTerrainMatrix:f}=n,b=this._helper.getMercatorTileCoordinates(a),E=a?this.calculatePosMatrix(a,h,!0):null;let C;return C=a!=null&&a.terrainRttPosMatrix32f&&f?a.terrainRttPosMatrix32f:E||c.bh(),{mainMatrix:C,tileMercatorCoords:b,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:C}}isLocationOccluded(n){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(n,a,h){return 1}transformLightDirection(n){return c.a$(n)}getRayDirectionFromPixel(n){throw new Error("Not implemented.")}projectTileCoordinates(n,a,h,f){const b=this.calculatePosMatrix(h);let E;f?(E=[n,a,f(n,a),1],c.aE(E,E,b)):(E=[n,a,0,1],Hu(E,E,b));const C=E[3];return{point:new c.P(E[0]/C,E[1]/C),signedDistanceFromCamera:C,isOccluded:!1}}populateCache(n){for(const a of n)this.calculatePosMatrix(a)}getMatrixForModel(n,a){const h=c.a7.fromLngLat(n,a),f=h.meterInMercatorCoordinateUnits(),b=c.bi();return c.Q(b,b,[h.x,h.y,h.z]),c.be(b,b,Math.PI),c.bf(b,b,Math.PI/2),c.S(b,b,[-f,f,f]),b}getProjectionDataForCustomLayer(n=!0){const a=new c.a3(0,0,0,0,0),h=this.getProjectionData({overscaledTileID:a,applyGlobeMatrix:n}),f=mc(a,this.worldSize);c.U(f,this._viewProjMatrix,f),h.tileMercatorCoords=[0,0,1,1];
vendor: 1,170 bytes, line 1252
1252const b=[c.a6,c.a6,this.worldSize/this._helper.pixelsPerMeter],E=c.bj();return c.S(E,f,b),h.fallbackMatrix=E,h.mainMatrix=E,h}getFastPathSimpleProjectionMatrix(n){return this.calculatePosMatrix(n)}}function Ro(){c.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Lg(_){if(_.useSlerp)if(_.k<1){const n=c.bk(_.startEulerAngles.roll,_.startEulerAngles.pitch,_.startEulerAngles.bearing),a=c.bk(_.endEulerAngles.roll,_.endEulerAngles.pitch,_.endEulerAngles.bearing),h=new Float64Array(4);c.bl(h,n,a,_.k);const f=c.bm(h);_.tr.setRoll(f.roll),_.tr.setPitch(f.pitch),_.tr.setBearing(f.bearing)}else _.tr.setRoll(_.endEulerAngles.roll),_.tr.setPitch(_.endEulerAngles.pitch),_.tr.setBearing(_.endEulerAngles.bearing);else _.tr.setRoll(c.H.number(_.startEulerAngles.roll,_.endEulerAngles.roll,_.k)),_.tr.setPitch(c.H.number(_.startEulerAngles.pitch,_.endEulerAngles.pitch,_.k)),_.tr.setBearing(c.H.number(_.startEulerAngles.bearing,_.endEulerAngles.bearing,_.k))}function Op(_,n,a,h,f){const b=f.padding,E=Vi(f.worldSize,a.getNorthWest()),C=Vi(f.worldSize,a.getNorthEast()),k=Vi(f.worldSize,a.getSouthEast()),O=Vi(f.worldSize,a.getSouthWest
vendor: 47,043 bytes, line 1252
1252()),F=c.an(-h),U=E.rotate(F),$=C.rotate(F),H=k.rotate(F),oe=O.rotate(F),de=new c.P(Math.max(U.x,$.x,oe.x,H.x),Math.max(U.y,$.y,oe.y,H.y)),me=new c.P(Math.min(U.x,$.x,oe.x,H.x),Math.min(U.y,$.y,oe.y,H.y)),pe=de.sub(me),ge=(f.width-(b.left+b.right+n.left+n.right))/pe.x,we=(f.height-(b.top+b.bottom+n.top+n.bottom))/pe.y;if(we<0||ge<0)return void Ro();const ye=Math.min(c.ar(f.scale*Math.min(ge,we)),_.maxZoom),fe=c.P.convert(_.offset),be=new c.P((n.left-n.right)/2,(n.top-n.bottom)/2).rotate(c.an(h)),_e=fe.add(be).mult(f.scale/c.ao(ye));return{center:Ua(f.worldSize,E.add(k).div(2).sub(_e)),zoom:ye,bearing:h}}class Zs{get useGlobeControls(){return!1}handlePanInertia(n,a){const h=n.mag(),f=Math.abs(Bs(a));return{easingOffset:n.mult(Math.min(.75*f/h,1)),easingCenter:a.center}}handleMapControlsRollPitchBearingZoom(n,a){n.bearingDelta&&a.setBearing(a.bearing+n.bearingDelta),n.pitchDelta&&a.setPitch(a.pitch+n.pitchDelta),n.rollDelta&&a.setRoll(a.roll+n.rollDelta),n.zoomDelta&&a.setZoom(a.zoom+n.zoomDelta)}handleMapControlsPan(n,a,h){n.around.distSqr(a.centerPoint)<.01||a.setLocationAtPoint(h,n.around)}cameraForBoxAndBearing(n,a,h,f,b){return Op(n,a,h,f,b)}handleJumpToCenterZoom(n,a){n.zoom!==(a.zoom!==void 0?+a.zoom:n.zoom)&&n.setZoom(+a.zoom),a.center!==void 0&&n.setCenter(c.W.convert(a.center))}handleEaseTo(n,a){const h=n.zoom,f=n.padding,b={roll:n.roll,pitch:n.pitch,bearing:n.bearing},E={roll:a.roll===void 0?n.roll:a.roll,pitch:a.pitch===void 0?n.pitch:a.pitch,bearing:a.bearing===void 0?n.bearing:a.bearing},C=a.zoom!==void 0,k=!n.isPaddingEqual(a.padding);let O=!1;const F=C?+a.zoom:n.zoom;let U=n.centerPoint.add(a.offsetAsPoint);const $=n.screenPointToLocation(U),{center:H,zoom:oe}=n.applyConstrain(c.W.convert(a.center||$),F??h);cs(n,H);const de=Vi(n.worldSize,$),me=Vi(n.worldSize,H).sub(de),pe=c.ao(oe-h);return O=oe!==h,{easeFunc:ge=>{if(O&&n.setZoom(c.H.number(h,oe,ge)),c.bn(b,E)||Lg({startEulerAngles:b,endEulerAngles:E,tr:n,k:ge,useSlerp:b.roll!=E.roll}),k&&(n.interpolatePadding(f,a.padding,ge),U=n.centerPoint.add(a.offsetAsPoint)),a.around)n.setLocationAtPoint(a.around,a.aroundPoint);else{const we=c.ao(n.zoom-h),ye=oe>h?Math.min(2,pe):Math.max(.5,pe),fe=Math.pow(ye,1-ge),be=Ua(n.worldSize,de.add(me.mult(ge*fe)).mult(we));n.setLocationAtPoint(n.renderWorldCopies?be.wrap():be,U)}},isZooming:O,elevationCenter:H}}handleFlyTo(n,a){const h=a.zoom!==void 0,f=n.zoom,b=n.applyConstrain(c.W.convert(a.center||a.locationAtOffset),h?+a.zoom:f),E=b.center,C=b.zoom;cs(n,E);const k=Vi(n.worldSize,a.locationAtOffset),O=Vi(n.worldSize,E).sub(k),F=O.mag(),U=c.ao(C-f);let $;if(a.minZoom!==void 0){const H=Math.min(+a.minZoom,f,C),oe=n.applyConstrain(E,H).zoom;$=c.ao(oe-f)}return{easeFunc:(H,oe,de,me)=>{n.setZoom(H===1?C:f+c.ar(oe));const pe=H===1?E:Ua(n.worldSize,k.add(O.mult(de)).mult(oe));n.setLocationAtPoint(n.renderWorldCopies?pe.wrap():pe,me)},scaleOfZoom:U,targetCenter:E,scaleOfMinZoom:$,pixelPathLength:F}}}class ir{constructor(n,a,h){this.blendFunction=n,this.blendColor=a,this.mask=h}}ir.Replace=[1,0],ir.disabled=new ir(ir.Replace,c.bo.transparent,[!1,!1,!1,!1]),ir.unblended=new ir(ir.Replace,c.bo.transparent,[!0,!0,!0,!0]),ir.alphaBlended=new ir([1,771],c.bo.transparent,[!0,!0,!0,!0]);const Ka=2305;class Nt{constructor(n,a,h){this.enable=n,this.mode=a,this.frontFace=h}}Nt.disabled=new Nt(!1,1029,Ka),Nt.backCCW=new Nt(!0,1029,Ka),Nt.frontCCW=new Nt(!0,1028,Ka);class At{constructor(n,a,h){this.func=n,this.mask=a,this.range=h}}At.ReadOnly=!1,At.ReadWrite=!0,At.disabled=new At(519,At.ReadOnly,[0,1]);const Ya=7680;class Bt{constructor(n,a,h,f,b,E){this.test=n,this.ref=a,this.mask=h,this.fail=f,this.depthFail=b,this.pass=E}}function $i(_){return typeof WebGL2RenderingContext<"u"&&_ instanceof WebGL2RenderingContext}Bt.disabled=new Bt({func:519,mask:0},0,0,Ya,Ya,Ya);class Qa{get awaitingQuery(){return!!this._readbackQueue}constructor(n){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=n;const a=n.context,h=a.gl;this._texFormat=h.RGBA,this._texType=h.UNSIGNED_BYTE;const f=new c.aU;f.emplaceBack(-1,-1),f.emplaceBack(2,-1),f.emplaceBack(-1,2);const b=new c.aW;b.emplaceBack(0,1,2),this._fullscreenTriangle=new nr(a.createVertexBuffer(f,ls.members),a.createIndexBuffer(b),c.aV.simpleSegment(0,0,f.length,b.length)),this._resultBuffer=new Uint8Array(4),a.activeTexture.set(h.TEXTURE1);const E=h.createTexture();h.bindTexture(h.TEXTURE_2D,E),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_S,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_WRAP_T,h.CLAMP_TO_EDGE),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MIN_FILTER,h.NEAREST),h.texParameteri(h.TEXTURE_2D,h.TEXTURE_MAG_FILTER,h.NEAREST),h.texImage2D(h.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=a.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(E),$i(h)&&(this._pbo=h.createBuffer(),h.bindBuffer(h.PIXEL_PACK_BUFFER,this._pbo),h.bufferData(h.PIXEL_PACK_BUFFER,4,h.STREAM_READ),h.bindBuffer(h.PIXEL_PACK_BUFFER,null))}destroy(){const n=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),n.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(n,a){const h=this._updateCount;return this._readbackQueue?h>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():h>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(n,a),this._updateCount++,this._measuredError}_bindFramebuffer(){const n=this._cachedRenderContext.context,a=n.gl;n.activeTexture.set(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this._fbo.colorAttachment.get()),n.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(n,a){const h=this._cachedRenderContext.context,f=h.gl;if(this._bindFramebuffer(),h.viewport.set([0,0,this._texWidth,this._texHeight]),h.clear({color:c.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(h,f.TRIANGLES,At.disabled,Bt.disabled,ir.unblended,Nt.disabled,((b,E)=>({u_input:b,u_output_expected:E}))(n,a),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&$i(f)){f.bindBuffer(f.PIXEL_PACK_BUFFER,this._pbo),f.readBuffer(f.COLOR_ATTACHMENT0),f.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),f.bindBuffer(f.PIXEL_PACK_BUFFER,null);const b=f.fenceSync(f.SYNC_GPU_COMMANDS_COMPLETE,0);f.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:b}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const n=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&$i(n)){const a=n.clientWaitSync(this._readbackQueue.sync,0,0);if(a===n.WAIT_FAILED)return c.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(a===n.TIMEOUT_EXPIRED)return;n.bindBuffer(n.PIXEL_PACK_BUFFER,this._pbo),n.getBufferSubData(n.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),n.bindBuffer(n.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),n.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Qa._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(n){let a=0;return a+=n[0]/256,a+=n[1]/65536,a+=n[2]/16777216,n[3]<127&&(a=-a),a/128}}const Hs=c.a6/128;function Ja(_,n){const a=_.granularity!==void 0?Math.max(_.granularity,1):1,h=a+(_.generateBorders?2:0),f=a+(_.extendToNorthPole||_.generateBorders?1:0)+(_.extendToSouthPole||_.generateBorders?1:0),b=h+1,E=f+1,C=_.generateBorders?-1:0,k=_.generateBorders||_.extendToNorthPole?-1:0,O=a+(_.generateBorders?1:0),F=a+(_.generateBorders||_.extendToSouthPole?1:0),U=b*E,$=h*f*6,H=b*E>65536;if(H&&n==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const oe=H||n==="32bit",de=new Int16Array(2*U);let me=0;for(let we=k;we<=F;we++)for(let ye=C;ye<=O;ye++){let fe=ye/a*c.a6;ye===-1&&(fe=-Hs),ye===a+1&&(fe=c.a6+Hs);let be=we/a*c.a6;we===-1&&(be=_.extendToNorthPole?c.bq:-Hs),we===a+1&&(be=_.extendToSouthPole?c.br:c.a6+Hs),de[me++]=fe,de[me++]=be}const pe=oe?new Uint32Array($):new Uint16Array($);let ge=0;for(let we=0;we<f;we++)for(let ye=0;ye<h;ye++){const fe=ye+1+we*b,be=ye+(we+1)*b,_e=ye+1+(we+1)*b;pe[ge++]=ye+we*b,pe[ge++]=be,pe[ge++]=fe,pe[ge++]=fe,pe[ge++]=be,pe[ge++]=_e}return{vertices:de.buffer.slice(0),indices:pe.buffer.slice(0),uses32bitIndices:oe}}const Fp=new c.aT({fill:new c.bs(128,2),line:new c.bs(512,0),tile:new c.bs(128,32),stencil:new c.bs(128,1),circle:3});class Qu{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return gr.projectionGlobe}get vertexShaderPreludeCode(){return gr.projectionMercator.vertexSource}get subdivisionGranularity(){return Fp}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(n){this._errorMeasurement||(this._errorMeasurement=new Qa(n));const a=c.Y(this._errorQueryLatitudeDegrees),h=2*Math.atan(Math.exp(Math.PI-a*Math.PI*2))-.5*Math.PI,f=this._errorMeasurement.updateErrorLoop(a,h),b=Y();f!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=f,this._errorMeasurementLastChangeTime=b);const E=Math.min(Math.max((b-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=c.bt(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,c.bu(E))}_getMeshKey(n){return`${n.granularity.toString(36)}_${n.generateBorders?"b":""}${n.extendToNorthPole?"n":""}${n.extendToSouthPole?"s":""}`}getMeshFromTileID(n,a,h,f,b){const E=(b==="stencil"?Fp.stencil:Fp.tile).getGranularityForZoomLevel(a.z);return this._getMesh(n,{granularity:E,generateBorders:h,extendToNorthPole:a.y===0&&f,extendToSouthPole:a.y===(1<<a.z)-1&&f})}_getMesh(n,a){const h=this._getMeshKey(a);if(h in this._tileMeshCache)return this._tileMeshCache[h];const f=function(b,E){const C=Ja(E,"16bit"),k=c.aU.deserialize({arrayBuffer:C.vertices,length:C.vertices.byteLength/2/2}),O=c.aW.deserialize({arrayBuffer:C.indices,length:C.indices.byteLength/2/3});return new nr(b.createVertexBuffer(k,ls.members),b.createIndexBuffer(O),c.aV.simpleSegment(0,0,k.length,O.length))}(n,a);return this._tileMeshCache[h]=f,f}recalculate(n){}hasTransition(){var n;const a=Y();let h=!1;return h||(h=(a-this._errorMeasurementLastChangeTime)/1e3<.7),h||(h=(n=this._errorMeasurement)===null||n===void 0?void 0:n.awaitingQuery),h}setErrorQueryLatitudeDegrees(n){this._errorQueryLatitudeDegrees=n}}const zg=new c.u({type:new c.D(c.x.projection.type)});class Og extends c.E{constructor(n){super(),this._transitionable=new c.y(zg,void 0),this.setProjection(n),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new c.J(0)),this._mercatorProjection=new On,this._verticalPerspectiveProjection=new Qu}get transitionState(){const n=this.properties.get("type");if(typeof n=="string"&&n==="mercator")return 0;if(typeof n=="string"&&n==="vertical-perspective")return 1;if(n instanceof c.bv){if(n.from==="vertical-perspective"&&n.to==="mercator")return 1-n.transition;if(n.from==="mercator"&&n.to==="vertical-perspective")return n.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(n){this._mercatorProjection.updateGPUdependent(n),this._verticalPerspectiveProjection.updateGPUdependent(n)}getMeshFromTileID(n,a,h,f,b){return this.currentProjection.getMeshFromTileID(n,a,h,f,b)}setProjection(n){this._transitionable.setValue("type",(n==null?void 0:n.type)||"mercator")}updateTransitions(n){this._transitioning=this._transitionable.transitioned(n,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(n){this.properties=this._transitioning.possiblyEvaluate(n)}setErrorQueryLatitudeDegrees(n){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(n),this._mercatorProjection.setErrorQueryLatitudeDegrees(n)}}function Fg(_){const n=ai(_.worldSize,_.center.lat);return 2*Math.PI*n}function Dr(_,n,a,h,f){const b=1/(1<<f),E=n/c.a6*b+h*b,C=c.by((_/c.a6*b+a*b)*Math.PI*2+Math.PI,2*Math.PI),k=2*Math.atan(Math.exp(Math.PI-E*Math.PI*2))-.5*Math.PI,O=Math.cos(k),F=new Float64Array(3);return F[0]=Math.sin(C)*O,F[1]=Math.sin(k),F[2]=Math.cos(C)*O,F}function Yr(_){return function(n,a){const h=Math.cos(a),f=new Float64Array(3);return f[0]=Math.sin(n)*h,f[1]=Math.sin(a),f[2]=Math.cos(n)*h,f}(_.lng*Math.PI/180,_.lat*Math.PI/180)}function ai(_,n){return _/(2*Math.PI)/Math.cos(n*Math.PI/180)}function Tc(_){const n=Math.asin(_[1])/Math.PI*180,a=Math.sqrt(_[0]*_[0]+_[2]*_[2]);if(a>1e-6){const h=_[0]/a,f=Math.acos(_[2]/a),b=(h>0?f:-f)/Math.PI*180;return new c.W(c.X(b,-180,180),n)}return new c.W(0,n)}function Ec(_){return Math.cos(_*Math.PI/180)}function Zr(_,n){const a=Ec(_),h=Ec(n);return c.ar(h/a)}function Xs(_,n){const a=_.rotate(n.bearingInRadians),h=n.zoom+Zr(n.center.lat,0),f=c.bt(1/Ec(n.center.lat),1/Ec(Math.min(Math.abs(n.center.lat),60)),c.bw(h,7,3,0,1)),b=360/Fg({worldSize:n.worldSize,center:{lat:n.center.lat}});return new c.W(n.center.lng-a.x*b*f,c.al(n.center.lat+a.y*b,-c.am,c.am))}function jp(_){const n=.5*_,a=Math.sin(n),h=Math.cos(n);return Math.log(a+h)-Math.log(h-a)}function jg(_,n,a,h){const f=_.lat+a*h;if(Math.abs(a)>1){const b=(Math.sign(_.lat+a)!==Math.sign(_.lat)?-Math.abs(_.lat):Math.abs(_.lat))*Math.PI/180,E=Math.abs(_.lat+a)*Math.PI/180,C=jp(b+h*(E-b)),k=jp(b),O=jp(E);return new c.W(_.lng+n*((C-k)/(O-k)),f)}return new c.W(_.lng+n*h,f)}class F0{constructor(n){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=n}swapBuffers(){if(!this._hadAnyChanges)return;const n=this._cachePrevious;this._cachePrevious=this._cache,this._cache=n,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(n,a,h,f){const b=`${n.z}_${n.x}_${n.y}_${f!=null&&f.terrain?"t":""}`,E=this._cache.get(b);if(E)return E;const C=this._cachePrevious.get(b);if(C)return this._cache.set(b,C),C;const k=this._boundingVolumeFactory(n,a,h,f);return this._cache.set(b,k),this._hadAnyChanges=!0,k}}class el{constructor(n,a,h,f){this.min=h,this.max=f,this.points=n,this.planes=a}static fromAabb(n,a){const h=[];for(let f=0;f<8;f++)h.push([1&~f?n[0]:a[0],(f>>1&1)==1?a[1]:n[1],(f>>2&1)==1?a[2]:n[2]]);return new el(h,[[-1,0,0,a[0]],[1,0,0,-n[0]],[0,-1,0,a[1]],[0,1,0,-n[1]],[0,0,-1,a[2]],[0,0,1,-n[2]]],n,a)}static fromCenterSizeAngles(n,a,h){const f=c.bA([],h[0],h[1],h[2]),b=c.bB([],[a[0],0,0],f),E=c.bB([],[0,a[1],0],f),C=c.bB([],[0,0,a[2]],f),k=[...n],O=[...n];for(let U=0;U<8;U++)for(let $=0;$<3;$++){const H=n[$]+b[$]*(1&~U?-1:1)+E[$]*((U>>1&1)==1?1:-1)+C[$]*((U>>2&1)==1?1:-1);k[$]=Math.min(k[$],H),O[$]=Math.max(O[$],H)}const F=[];for(let U=0;U<8;U++){const $=[...n];c.a_($,$,c.aZ([],b,1&~U?-1:1)),c.a_($,$,c.aZ([],E,(U>>1&1)==1?1:-1)),c.a_($,$,c.aZ([],C,(U>>2&1)==1?1:-1)),F.push($)}return new el(F,[[...b,-c.b3(b,F[0])],[...E,-c.b3(E,F[0])],[...C,-c.b3(C,F[0])],[-b[0],-b[1],-b[2],-c.b3(b,F[7])],[-E[0],-E[1],-E[2],-c.b3(E,F[7])],[-C[0],-C[1],-C[2],-c.b3(C,F[7])]],k,O)}intersectsFrustum(n){let a=!0;const h=this.points.length,f=this.planes.length,b=n.planes.length,E=n.points.length;for(let C=0;C<b;C++){const k=n.planes[C];let O=0;for(let F=0;F<h;F++){const U=this.points[F];k[0]*U[0]+k[1]*U[1]+k[2]*U[2]+k[3]>=0&&O++}if(O===0)return 0;O<h&&(a=!1)}if(a)return 2;for(let C=0;C<f;C++){const k=this.planes[C];let O=0;for(let F=0;F<E;F++){const U=n.points[F];k[0]*U[0]+k[1]*U[1]+k[2]*U[2]+k[3]>=0&&O++}if(O===0)return 0}return 1}intersectsPlane(n){const a=this.points.length;let h=0;for(let f=0;f<a;f++){const b=this.points[f];n[0]*b[0]+n[1]*b[1]+n[2]*b[2]+n[3]>=0&&h++}return h===a?2:h===0?0:1}}function Ju(_,n,a){const h=_-n;return h<0?-h:Math.max(0,h-a)}function Np(_,n,a,h,f){const b=_-a;let E;return E=b<0?Math.min(-b,1+b-f):b>f?Math.min(Math.max(b-f,0),1-b):0,Math.max(E,Ju(n,h,f))}class ed{constructor(){this._boundingVolumeCache=new F0(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(n,a,h,f){const b=1<<h.z,E=1/b,C=h.x/b,k=h.y/b;let O=2;return O=Math.min(O,Np(n,a,C,k,E)),O=Math.min(O,Np(n,a,C+.5,-k-E,E)),O=Math.min(O,Np(n,a,C+.5,2-k-E,E)),O}getWrap(n,a,h){const f=1<<a.z,b=1/f,E=a.x/f,C=Ju(n.x,E,b),k=Ju(n.x,E-1,b),O=Ju(n.x,E+1,b),F=Math.min(C,k,O);return F===O?1:F===k?-1:0}allowVariableZoom(n,a){return Hn(n,a)>4}allowWorldCopies(){return!1}getTileBoundingVolume(n,a,h,f){return this._boundingVolumeCache.getTileBoundingVolume(n,a,h,f)}_computeTileBoundingVolume(n,a,h,f){var b,E;let C=0,k=0;if(f!=null&&f.terrain){const O=new c.a3(n.z,a,n.z,n.x,n.y),F=f.terrain.getMinMaxElevation(O);C=(b=F.minElevation)!==null&&b!==void 0?b:Math.min(0,h),k=(E=F.maxElevation)!==null&&E!==void 0?E:Math.max(0,h)}if(C/=c.bD,k/=c.bD,C+=1,k+=1,n.z<=0)return el.fromAabb([-k,-k,-k],[k,k,k]);if(n.z===1)return el.fromAabb([n.x===0?-k:0,n.y===0?0:-k,-k],[n.x===0?0:k,n.y===0?k:0,k]);{const O=[Dr(0,0,n.x,n.y,n.z),Dr(c.a6,0,n.x,n.y,n.z),Dr(c.a6,c.a6,n.x,n.y,n.z),Dr(0,c.a6,n.x,n.y,n.z)],F=[];for(const Xe of O)F.push(c.aZ([],Xe,k));if(k!==C)for(const Xe of O)F.push(c.aZ([],Xe,C));n.y===0&&F.push([0,1,0]),n.y===(1<<n.z)-1&&F.push([0,-1,0]);const U=[1,1,1],$=[-1,-1,-1];for(const Xe of F)for(let He=0;He<3;He++)U[He]=Math.min(U[He],Xe[He]),$[He]=Math.max($[He],Xe[He]);const H=Dr(c.a6/2,c.a6/2,n.x,n.y,n.z),oe=c.b2([],[0,1,0],H);c.b1(oe,oe);const de=c.b2([],H,oe);c.b1(de,de);const me=c.b2([],O[2],O[1]);c.b1(me,me);const pe=c.b2([],O[0],O[3]);c.b1(pe,pe),F.push(c.aZ([],H,k)),n.y>=(1<<n.z)/2&&F.push(c.aZ([],Dr(c.a6/2,0,n.x,n.y,n.z),k)),n.y<(1<<n.z)/2&&F.push(c.aZ([],Dr(c.a6/2,c.a6,n.x,n.y,n.z),k));const ge=td(H,F),we=td(de,F),ye=[-H[0],-H[1],-H[2],ge.max],fe=[H[0],H[1],H[2],-ge.min],be=[-de[0],-de[1],-de[2],we.max],_e=[de[0],de[1],de[2],-we.min],Ie=[...me,0],je=[...pe,0],Ne=[];return n.y===0?Ne.push(c.bC(je,Ie,ye),c.bC(je,Ie,fe)):Ne.push(c.bC(be,Ie,ye),c.bC(be,Ie,fe),c.bC(be,je,ye),c.bC(be,je,fe)),n.y===(1<<n.z)-1?Ne.push(c.bC(je,Ie,ye),c.bC(je,Ie,fe)):Ne.push(c.bC(_e,Ie,ye),c.bC(_e,Ie,fe),c.bC(_e,je,ye),c.bC(_e,je,fe)),new el(Ne,[ye,fe,be,_e,Ie,je],U,$)}}}function td(_,n){let a=1/0,h=-1/0;for(const f of n){const b=c.b3(_,f);a=Math.min(a,b),h=Math.max(h,b)}return{min:a,max:h}}class Ks{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(n){this._helper.setMinZoom(n)}setMaxZoom(n){this._helper.setMaxZoom(n)}setMinPitch(n){this._helper.setMinPitch(n)}setMaxPitch(n){this._helper.setMaxPitch(n)}setRenderWorldCopies(n){this._helper.setRenderWorldCopies(n)}setBearing(n){this._helper.setBearing(n)}setPitch(n){this._helper.setPitch(n)}setRoll(n){this._helper.setRoll(n)}setFov(n){this._helper.setFov(n)}setZoom(n){this._helper.setZoom(n)}setCenter(n){this._helper.setCenter(n)}setElevation(n){this._helper.setElevation(n)}setMinElevationForCurrentTile(n){this._helper.setMinElevationForCurrentTile(n)}setPadding(n){this._helper.setPadding(n)}interpolatePadding(n,a,h){this._helper.interpolatePadding(n,a,h)}isPaddingEqual(n){return this._helper.isPaddingEqual(n)}resize(n,a){this._helper.resize(n,a)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(n){this._helper.setMaxBounds(n)}setConstrainOverride(n){this._helper.setConstrainOverride(n)}overrideNearFarZ(n,a){this._helper.overrideNearFarZ(n,a)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(n){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),n)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(n){}constructor(n){this._cachedClippingPlane=c.bE(),this._projectionMatrix=c.bi(),this._globeViewProjMatrix32f=c.bh(),this._globeViewProjMatrixNoCorrection=c.bi(),this._globeViewProjMatrixNoCorrectionInverted=c.bi(),this._globeProjMatrixInverted=c.bi(),this._cameraPosition=c.bz(),this._globeLatitudeErrorCorrectionRadians=0,this.defaultConstrain=(a,h)=>{const f=c.al(a.lat,-c.am,c.am),b=c.al(+h,this.minZoom+Zr(0,f),this.maxZoom);return{center:new c.W(a.lng,f),zoom:b}},this.applyConstrain=(a,h)=>this._helper.applyConstrain(a,h),this._helper=new qs({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(a,h)=>this.defaultConstrain(a,h)},n),this._coveringTilesDetailsProvider=new ed}clone(){const n=new Ks;return n.apply(this,!1),n}apply(n,a,h){this._globeLatitudeErrorCorrectionRadians=h||0,this._helper.apply(n,a)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const n=c.bz();return n[0]=this._cameraPosition[0],n[1]=this._cameraPosition[1],n[2]=this._cameraPosition[2],n}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(n){const{overscaledTileID:a,applyGlobeMatrix:h}=n,f=this._helper.getMercatorTileCoordinates(a);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:f,clippingPlane:this._cachedClippingPlane,projectionTransition:h?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(n){const a=this.pitchInRadians,h=this.cameraToCenterDistance/n,f=Math.sin(a)*h,b=Math.cos(a)*h+1,E=1/Math.sqrt(f*f+b*b)*1;let C=-f,k=b;const O=Math.sqrt(C*C+k*k);C/=O,k/=O;const F=[0,C,k];c.bF(F,F,[0,0,0],-this.bearingInRadians),c.bG(F,F,[0,0,0],-1*this.center.lat*Math.PI/180),c.bH(F,F,[0,0,0],this.center.lng*Math.PI/180);const U=1/c.b5(F);return c.aZ(F,F,U),[...F,-E*U]}isLocationOccluded(n){return!this.isSurfacePointVisible(Yr(n))}transformLightDirection(n){const a=this._helper._center.lng*Math.PI/180,h=this._helper._center.lat*Math.PI/180,f=Math.cos(h),b=[Math.sin(a)*f,Math.sin(h),Math.cos(a)*f],E=[b[2],0,-b[0]],C=[0,0,0];c.b2(C,E,b),c.b1(E,E),c.b1(C,C);const k=[0,0,0];return c.b1(k,[E[0]*n[0]+C[0]*n[1]+b[0]*n[2],E[1]*n[0]+C[1]*n[1]+b[1]*n[2],E[2]*n[0]+C[2]*n[1]+b[2]*n[2]]),k}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(n,a,h){const f=function(C,k,O){const F=1/(1<<O.z);return new c.a7(C/c.a6*F+O.x*F,k/c.a6*F+O.y*F)}(n,a,h.canonical),b=(E=f.y,[c.by(f.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-E*Math.PI*2))-.5*Math.PI]);var E;return this.getCircleRadiusCorrection()/Math.cos(b[1])}projectTileCoordinates(n,a,h,f){const b=h.canonical,E=Dr(n,a,b.x,b.y,b.z),C=1+(f?f(n,a):0)/c.bD,k=[E[0]*C,E[1]*C,E[2]*C,1];c.aE(k,k,this._globeViewProjMatrixNoCorrection);const O=this._cachedClippingPlane,F=O[0]*E[0]+O[1]*E[1]+O[2]*E[2]+O[3]<0;return{point:new c.P(k[0]/k[3],k[1]/k[3]),signedDistanceFromCamera:k[3],isOccluded:F}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const n=ai(this.worldSize,this.center.lat),a=c.bj(),h=c.bj();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*n),c.bc(a,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const f=this.centerOffset;a[8]=2*-f.x/this._helper._width,a[9]=2*f.y/this._helper._height,this._projectionMatrix=c.bd(a),this._globeProjMatrixInverted=c.bj(),c.bg(this._globeProjMatrixInverted,a),c.Q(a,a,[0,0,-this.cameraToCenterDistance]),c.be(a,a,this.rollInRadians),c.bf(a,a,-this.pitchInRadians),c.be(a,a,this.bearingInRadians),c.Q(a,a,[0,0,-n]);const b=c.bz();b[0]=n,b[1]=n,b[2]=n,c.bf(h,a,this.center.lat*Math.PI/180),c.bI(h,h,-this.center.lng*Math.PI/180),c.S(h,h,b),this._globeViewProjMatrixNoCorrection=h,c.bf(a,a,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),c.bI(a,a,-this.center.lng*Math.PI/180),c.S(a,a,b),this._globeViewProjMatrix32f=new Float32Array(a),this._globeViewProjMatrixNoCorrectionInverted=c.bj(),c.bg(this._globeViewProjMatrixNoCorrectionInverted,h);const E=c.bz();this._cameraPosition=c.bz(),this._cameraPosition[2]=this.cameraToCenterDistance/n,c.bF(this._cameraPosition,this._cameraPosition,E,-this.rollInRadians),c.bG(this._cameraPosition,this._cameraPosition,E,this.pitchInRadians),c.bF(this._cameraPosition,this._cameraPosition,E,-this.bearingInRadians),c.a_(this._cameraPosition,this._cameraPosition,[0,0,1]),c.bG(this._cameraPosition,this._cameraPosition,E,-this.center.lat*Math.PI/180),c.bH(this._cameraPosition,this._cameraPosition,E,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(n);const C=c.bd(this._globeViewProjMatrixNoCorrectionInverted);c.S(C,C,[1,1,-1]),this._cachedFrustum=Kn.fromInvProjectionMatrix(C,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(n){c.w("calculateFogMatrix is not supported on globe projection.");const a=c.bj();return c.ap(a),a}getVisibleUnwrappedCoordinates(n){return[new c.ba(0,n)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(n){n&&c.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(n,a){if(!this._globeViewProjMatrixNoCorrection)return 1;const h=Yr(n);c.aZ(h,h,1+a/c.bD);const f=c.bE();return c.aE(f,[h[0],h[1],h[2],1],this._globeViewProjMatrixNoCorrection),f[2]/f[3]}populateCache(n){}getBounds(){const n=.5*this.width,a=.5*this.height,h=[new c.P(0,0),new c.P(n,0),new c.P(this.width,0),new c.P(this.width,a),new c.P(this.width,this.height),new c.P(n,this.height),new c.P(0,this.height),new c.P(0,a)],f=[];for(const U of h)f.push(this.unprojectScreenPoint(U));let b=0,E=0,C=0,k=0;const O=this.center;for(const U of f){const $=c.bJ(O.lng,U.lng),H=c.bJ(O.lat,U.lat);$<E&&(E=$),$>b&&(b=$),H<k&&(k=H),H>C&&(C=H)}const F=[O.lng+E,O.lat+k,O.lng+b,O.lat+C];return this.isSurfacePointOnScreen([0,1,0])&&(F[3]=90,F[0]=-180,F[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(F[1]=-90,F[0]=-180,F[2]=180),new bt(F)}calculateCenterFromCameraLngLatAlt(n,a,h,f){return this._helper.calculateCenterFromCameraLngLatAlt(n,a,h,f)}setLocationAtPoint(n,a){const h=Yr(this.unprojectScreenPoint(a)),f=Yr(n),b=c.bz();c.bK(b);const E=c.bz();c.bH(E,h,b,-this.center.lng*Math.PI/180),c.bG(E,E,b,this.center.lat*Math.PI/180);const C=f[0]*f[0]+f[2]*f[2],k=E[0]*E[0];if(C<k)return;const O=Math.sqrt(C-k),F=-O,U=c.bL(f[0],f[2],E[0],O),$=c.bL(f[0],f[2],E[0],F),H=c.bz();c.bH(H,f,b,-U);const oe=c.bL(H[1],H[2],E[1],E[2]),de=c.bz();c.bH(de,f,b,-$);const me=c.bL(de[1],de[2],E[1],E[2]),pe=.5*Math.PI,ge=oe>=-pe&&oe<=pe,we=me>=-pe&&me<=pe;let ye,fe;if(ge&&we){const je=this.center.lng*Math.PI/180,Ne=this.center.lat*Math.PI/180;c.bM(U,je)+c.bM(oe,Ne)<c.bM($,je)+c.bM(me,Ne)?(ye=U,fe=oe):(ye=$,fe=me)}else if(ge)ye=U,fe=oe;else{if(!we)return;ye=$,fe=me}const be=ye/Math.PI*180,_e=fe/Math.PI*180,Ie=this.center.lat;this.setCenter(new c.W(be,c.al(_e,-90,90))),this.setZoom(this.zoom+Zr(Ie,this.center.lat))}locationToScreenPoint(n,a){const h=Yr(n);if(a){const f=a.getElevationForLngLatZoom(n,this._helper._tileZoom);c.aZ(h,h,1+f/c.bD)}return this._projectSurfacePointToScreen(h)}_projectSurfacePointToScreen(n){const a=c.bE();return c.aE(a,[...n,1],this._globeViewProjMatrixNoCorrection),a[0]/=a[3],a[1]/=a[3],new c.P((.5*a[0]+.5)*this.width,(.5*-a[1]+.5)*this.height)}screenPointToMercatorCoordinate(n,a){if(a){const h=a.pointCoordinate(n);if(h)return h}return c.a7.fromLngLat(this.unprojectScreenPoint(n))}screenPointToLocation(n,a){var h;return(h=this.screenPointToMercatorCoordinate(n,a))===null||h===void 0?void 0:h.toLngLat()}isPointOnMapSurface(n,a){const h=this._cameraPosition,f=this.getRayDirectionFromPixel(n);return!!this.rayPlanetIntersection(h,f)}getRayDirectionFromPixel(n){const a=c.bE();a[0]=n.x/this.width*2-1,a[1]=-1*(n.y/this.height*2-1),a[2]=1,a[3]=1,c.aE(a,a,this._globeViewProjMatrixNoCorrectionInverted),a[0]/=a[3],a[1]/=a[3],a[2]/=a[3];const h=c.bz();h[0]=a[0]-this._cameraPosition[0],h[1]=a[1]-this._cameraPosition[1],h[2]=a[2]-this._cameraPosition[2];const f=c.bz();return c.b1(f,h),f}isSurfacePointVisible(n){const a=this._cachedClippingPlane;return a[0]*n[0]+a[1]*n[1]+a[2]*n[2]+a[3]>=0}isSurfacePointOnScreen(n){if(!this.isSurfacePointVisible(n))return!1;const a=c.bE();return c.aE(a,[...n,1],this._globeViewProjMatrixNoCorrection),a[0]/=a[3],a[1]/=a[3],a[2]/=a[3],a[0]>-1&&a[0]<1&&a[1]>-1&&a[1]<1&&a[2]>-1&&a[2]<1}rayPlanetIntersection(n,a){const h=c.b3(n,a),f=c.bz(),b=c.bz();c.aZ(b,a,h),c.b0(f,n,b);const E=1-c.b3(f,f);if(E<0)return null;const C=c.b3(n,n)-1,k=-h+(h<0?1:-1)*Math.sqrt(E),O=C/k,F=k;return{tMin:Math.min(O,F),tMax:Math.max(O,F)}}unprojectScreenPoint(n){const a=this._cameraPosition,h=this.getRayDirectionFromPixel(n),f=this.rayPlanetIntersection(a,h);if(f){const F=c.bz();c.a_(F,a,[h[0]*f.tMin,h[1]*f.tMin,h[2]*f.tMin]);const U=c.bz();return c.b1(U,F),Tc(U)}const b=this._cachedClippingPlane,E=b[0]*h[0]+b[1]*h[1]+b[2]*h[2],C=-c.b9(b,a)/E,k=c.bz();if(C>0)c.a_(k,a,[h[0]*C,h[1]*C,h[2]*C]);else{const F=c.bz();c.a_(F,a,[2*h[0],2*h[1],2*h[2]]);const U=c.b9(this._cachedClippingPlane,F);c.b0(k,F,[this._cachedClippingPlane[0]*U,this._cachedClippingPlane[1]*U,this._cachedClippingPlane[2]*U])}const O=function(F){const U=c.bz();return U[0]=F[0]*-F[3],U[1]=F[1]*-F[3],U[2]=F[2]*-F[3],{center:U,radius:Math.sqrt(1-F[3]*F[3])}}(b);return Tc(function(F,U,$){const H=c.bz();c.b0(H,$,F);const oe=c.bz();return c.bx(oe,F,H,U/c.b7(H)),oe}(O.center,O.radius,k))}getMatrixForModel(n,a){const h=c.W.convert(n),f=1/c.bD,b=c.bi();return c.bI(b,b,h.lng/180*Math.PI),c.bf(b,b,-h.lat/180*Math.PI),c.Q(b,b,[0,0,1+a/c.bD]),c.bf(b,b,.5*Math.PI),c.S(b,b,[f,f,f]),b}getProjectionDataForCustomLayer(n=!0){const a=this.getProjectionData({overscaledTileID:new c.a3(0,0,0,0,0),applyGlobeMatrix:n});return a.tileMercatorCoords=[0,0,1,1],a}getFastPathSimpleProjectionMatrix(n){}}class tl{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(n){this._helper.setMinZoom(n)}setMaxZoom(n){this._helper.setMaxZoom(n)}setMinPitch(n){this._helper.setMinPitch(n)}setMaxPitch(n){this._helper.setMaxPitch(n)}setRenderWorldCopies(n){this._helper.setRenderWorldCopies(n)}setBearing(n){this._helper.setBearing(n)}setPitch(n){this._helper.setPitch(n)}setRoll(n){this._helper.setRoll(n)}setFov(n){this._helper.setFov(n)}setZoom(n){this._helper.setZoom(n)}setCenter(n){this._helper.setCenter(n)}setElevation(n){this._helper.setElevation(n)}setMinElevationForCurrentTile(n){this._helper.setMinElevationForCurrentTile(n)}setPadding(n){this._helper.setPadding(n)}interpolatePadding(n,a,h){this._helper.interpolatePadding(n,a,h)}isPaddingEqual(n){return this._helper.isPaddingEqual(n)}resize(n,a,h=!0){this._helper.resize(n,a,h)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(n){this._helper.setMaxBounds(n)}setConstrainOverride(n){this._helper.setConstrainOverride(n)}overrideNearFarZ(n,a){this._helper.overrideNearFarZ(n,a)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(n){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),n)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(n,a){this._globeness=n,this._globeLatitudeErrorCorrectionRadians=a,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(n){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(a,h)=>this.currentTransform.defaultConstrain(a,h),this.applyConstrain=(a,h)=>this._helper.applyConstrain(a,h),this._helper=new qs({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(a,h)=>this.defaultConstrain(a,h)},n),this._globeness=1,this._mercatorTransform=new Ws,this._verticalPerspectiveTransform=new Ks}clone(){const n=new tl;return n._globeness=this._globeness,n._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,n.apply(this,!1),n}apply(n,a){this._helper.apply(n,a),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(n){const a=this._mercatorTransform.getProjectionData(n),h=this._verticalPerspectiveTransform.getProjectionData(n);return{mainMatrix:this.isGlobeRendering?h.mainMatrix:a.mainMatrix,clippingPlane:h.clippingPlane,tileMercatorCoords:h.tileMercatorCoords,projectionTransition:n.applyGlobeMatrix?this._globeness:0,fallbackMatrix:a.fallbackMatrix}}isLocationOccluded(n){return this.currentTransform.isLocationOccluded(n)}transformLightDirection(n){return this.currentTransform.transformLightDirection(n)}getPixelScale(){return c.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return c.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(n,a,h){const f=this._mercatorTransform.getPitchedTextCorrection(n,a,h),b=this._verticalPerspectiveTransform.getPitchedTextCorrection(n,a,h);return c.bt(f,b,this._globeness)}projectTileCoordinates(n,a,h,f){return this.currentTransform.projectTileCoordinates(n,a,h,f)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(n){return this.currentTransform.calculateFogMatrix(n)}getVisibleUnwrappedCoordinates(n){return this.currentTransform.getVisibleUnwrappedCoordinates(n)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(n){this._mercatorTransform.recalculateZoomAndCenter(n),this._verticalPerspectiveTransform.recalculateZoomAndCenter(n)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(n,a){return this.currentTransform.lngLatToCameraDepth(n,a)}populateCache(n){this._mercatorTransform.populateCache(n),this._verticalPerspectiveTransform.populateCache(n)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(n,a,h,f){return this._helper.calculateCenterFromCameraLngLatAlt(n,a,h,f)}setLocationAtPoint(n,a){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(n,a),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(n,a),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(n,a){return this.currentTransform.locationToScreenPoint(n,a)}screenPointToMercatorCoordinate(n,a){return this.currentTransform.screenPointToMercatorCoordinate(n,a)}screenPointToLocation(n,a){return this.currentTransform.screenPointToLocation(n,a)}isPointOnMapSurface(n,a){return this.currentTransform.isPointOnMapSurface(n,a)}getRayDirectionFromPixel(n){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(n)}getMatrixForModel(n,a){return this.currentTransform.getMatrixForModel(n,a)}getProjectionDataForCustomLayer(n=!0){const a=this._mercatorTransform.getProjectionDataForCustomLayer(n);if(!this.isGlobeRendering)return a;const h=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(n);return h.fallbackMatrix=a.mainMatrix,h}getFastPathSimpleProjectionMatrix(n){return this.currentTransform.getFastPathSimpleProjectionMatrix(n)}}class li{get useGlobeControls(){return!0}handlePanInertia(n,a){const h=Xs(n,a);return Math.abs(h.lng-a.center.lng)>180&&(h.lng=a.center.lng+179.5*Math.sign(h.lng-a.center.lng)),{easingCenter:h,easingOffset:new c.P(0,0)}}handleMapControlsRollPitchBearingZoom(n,a){const h=n.around,f=a.screenPointToLocation(h);n.bearingDelta&&a.setBearing(a.bearing+n.bearingDelta),n.pitchDelta&&a.setPitch(a.pitch+n.pitchDelta),n.rollDelta&&a.setRoll(a.roll+n.rollDelta);const b=a.zoom;n.zoomDelta&&a.setZoom(a.zoom+n.zoomDelta);const E=a.zoom-b;if(E===0)return;const C=c.bJ(a.center.lng,f.lng),k=C/(Math.abs(C/180)+1),O=c.bJ(a.center.lat,f.lat),F=a.getRayDirectionFromPixel(h),U=a.cameraPosition,$=-1*c.b3(U,F),H=c.bz();c.a_(H,U,[F[0]*$,F[1]*$,F[2]*$]);const oe=c.b5(H)-1,de=Math.exp(.5*-Math.max(oe-.3,0)),me=ai(a.worldSize,a.center.lat)/Math.min(a.width,a.height),pe=c.bw(me,.9,.5,1,.25),ge=(1-c.ao(-E))*Math.min(de,pe),we=a.center.lat,ye=a.zoom,fe=new c.W(a.center.lng+k*ge,c.al(a.center.lat+O*ge,-c.am,c.am));a.setLocationAtPoint(f,h);const be=a.center,_e=c.bw(Math.abs(C),45,85,0,1),Ie=c.bw(me,.75,.35,0,1),je=Math.pow(Math.max(_e,Ie),.25),Ne=c.bJ(be.lng,fe.lng),Xe=c.bJ(be.lat,fe.lat);a.setCenter(new c.W(be.lng+Ne*je,be.lat+Xe*je).wrap()),a.setZoom(ye+Zr(we,a.center.lat))}handleMapControlsPan(n,a,h){if(!n.panDelta)return;const f=a.center.lat,b=a.zoom;a.setCenter(Xs(n.panDelta,a).wrap()),a.setZoom(b+Zr(f,a.center.lat))}cameraForBoxAndBearing(n,a,h,f,b){const E=Op(n,a,h,f,b),C=a.left/b.width*2-1,k=(b.width-a.right)/b.width*2-1,O=a.top/b.height*-2+1,F=(b.height-a.bottom)/b.height*-2+1,U=c.bJ(h.getWest(),h.getEast())<0,$=U?h.getEast():h.getWest(),H=U?h.getWest():h.getEast(),oe=Math.max(h.getNorth(),h.getSouth()),de=Math.min(h.getNorth(),h.getSouth()),me=$+.5*c.bJ($,H),pe=oe+.5*c.bJ(oe,de),ge=b.clone();ge.setCenter(E.center),ge.setBearing(E.bearing),ge.setPitch(0),ge.setRoll(0),ge.setZoom(E.zoom);const we=ge.modelViewProjectionMatrix,ye=[Yr(h.getNorthWest()),Yr(h.getNorthEast()),Yr(h.getSouthWest()),Yr(h.getSouthEast()),Yr(new c.W(H,pe)),Yr(new c.W($,pe)),Yr(new c.W(me,oe)),Yr(new c.W(me,de))],fe=Yr(E.center);let be=Number.POSITIVE_INFINITY;for(const _e of ye)C<0&&(be=li.getLesserNonNegativeNonNull(be,li.solveVectorScale(_e,fe,we,"x",C))),k>0&&(be=li.getLesserNonNegativeNonNull(be,li.solveVectorScale(_e,fe,we,"x",k))),O>0&&(be=li.getLesserNonNegativeNonNull(be,li.solveVectorScale(_e,fe,we,"y",O))),F<0&&(be=li.getLesserNonNegativeNonNull(be,li.solveVectorScale(_e,fe,we,"y",F)));if(Number.isFinite(be)&&be!==0)return E.zoom=Math.min(ge.zoom+c.ar(be),n.maxZoom),E;Ro()}handleJumpToCenterZoom(n,a){const h=n.center.lat,f=n.applyConstrain(a.center?c.W.convert(a.center):n.center,n.zoom).center;n.setCenter(f.wrap());const b=a.zoom!==void 0?+a.zoom:n.zoom+Zr(h,f.lat);n.zoom!==b&&n.setZoom(b)}handleEaseTo(n,a){const h=n.zoom,f=n.center,b=n.padding,E={roll:n.roll,pitch:n.pitch,bearing:n.bearing},C={roll:a.roll===void 0?n.roll:a.roll,pitch:a.pitch===void 0?n.pitch:a.pitch,bearing:a.bearing===void 0?n.bearing:a.bearing},k=a.zoom!==void 0,O=!n.isPaddingEqual(a.padding);let F=!1;const U=a.center?c.W.convert(a.center):f,$=n.applyConstrain(U,h).center;cs(n,$);const H=n.clone();H.setCenter($),H.setZoom(k?+a.zoom:h+Zr(f.lat,U.lat)),H.setBearing(a.bearing);const oe=new c.P(c.al(n.centerPoint.x+a.offsetAsPoint.x,0,n.width),c.al(n.centerPoint.y+a.offsetAsPoint.y,0,n.height));H.setLocationAtPoint($,oe);const de=(a.offset&&a.offsetAsPoint.mag())>0?H.center:$,me=k?+a.zoom:h+Zr(f.lat,de.lat),pe=h+Zr(f.lat,0),ge=me+Zr(de.lat,0),we=c.bJ(f.lng,de.lng),ye=c.bJ(f.lat,de.lat),fe=c.ao(ge-pe);return F=me!==h,{easeFunc:be=>{if(c.bn(E,C)||Lg({startEulerAngles:E,endEulerAngles:C,tr:n,k:be,useSlerp:E.roll!=C.roll}),O&&n.interpolatePadding(b,a.padding,be),a.around)c.w("Easing around a point is not supported under globe projection."),n.setLocationAtPoint(a.around,a.aroundPoint);else{const _e=ge>pe?Math.min(2,fe):Math.max(.5,fe),Ie=Math.pow(_e,1-be),je=jg(f,we,ye,be*Ie);n.setCenter(je.wrap())}if(F){const _e=c.H.number(pe,ge,be)+Zr(0,n.center.lat);n.setZoom(_e)}},isZooming:F,elevationCenter:de}}handleFlyTo(n,a){const h=a.zoom!==void 0,f=n.center,b=n.zoom,E=n.padding,C=!n.isPaddingEqual(a.padding),k=n.applyConstrain(c.W.convert(a.center||a.locationAtOffset),b).center,O=h?+a.zoom:n.zoom+Zr(n.center.lat,k.lat),F=n.clone();F.setCenter(k),F.setZoom(O),F.setBearing(a.bearing);const U=new c.P(c.al(n.centerPoint.x+a.offsetAsPoint.x,0,n.width),c.al(n.centerPoint.y+a.offsetAsPoint.y,0,n.height));F.setLocationAtPoint(k,U);const $=F.center;cs(n,$);const H=function(ye,fe,be){const _e=Yr(fe),Ie=Yr(be),je=c.b3(_e,Ie),Ne=Math.acos(je),Xe=Fg(ye);return Ne/(2*Math.PI)*Xe}(n,f,$),oe=b+Zr(f.lat,0),de=O+Zr($.lat,0),me=c.ao(de-oe);let pe;if(typeof a.minZoom=="number"){const ye=+a.minZoom+Zr($.lat,0),fe=Math.min(ye,oe,de)+Zr(0,$.lat),be=n.applyConstrain($,fe).zoom+Zr($.lat,0);pe=c.ao(be-oe)}const ge=c.bJ(f.lng,$.lng),we=c.bJ(f.lat,$.lat);return{easeFunc:(ye,fe,be,_e)=>{const Ie=jg(f,ge,we,be);C&&n.interpolatePadding(E,a.padding,ye);const je=ye===1?$:Ie;n.setCenter(je.wrap());const Ne=oe+c.ar(fe);n.setZoom(ye===1?O:Ne+Zr(0,je.lat))},scaleOfZoom:me,targetCenter:$,scaleOfMinZoom:pe,pixelPathLength:H}}static solveVectorScale(n,a,h,f,b){const E=f==="x"?[h[0],h[4],h[8],h[12]]:[h[1],h[5],h[9],h[13]],C=[h[3],h[7],h[11],h[15]],
1252k=n[0]*E[0]+n[1]*E[1]+n[2]*E[2],O=n[0]*C[0]+n[1]*C[1]+n[2]*C[2],F=a[0]*E[0]+a[1]*E[1]+a[2]*E[2],U=a[0]*C[0]+a[1]*C[1]+a[2]*C[2];return F+b*O===k+b*U||C[3]*(k-F)+E[3]*(U-O)+k*U==F*O?null:(F+E[3]-b*U-b*C[3])/(F-k-b*U+b*O)}static getLesserNonNegativeNonNull(n,a){return a!==null&&a>=0&&a<n?a:n}}class Gi{constructor(n){this._globe=n,this._mercatorCameraHelper=new Zs,this._verticalPerspectiveCameraHelper=new li}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(n,a){return this.currentHelper.handlePanInertia(n,a)}handleMapControlsRollPitchBearingZoom(n,a){this.currentHelper.handleMapControlsRollPitchBearingZoom(n,a)}handleMapControlsPan(n,a,h){this.currentHelper.handleMapControlsPan(n,a,h)}cameraForBoxAndBearing(n,a,h,f,b){return this.currentHelper.cameraForBoxAndBearing(n,a,h,f,b)}handleJumpToCenterZoom(n,a){this.currentHelper.handleJumpToCenterZoom(n,a)}handleEaseTo(n,a){return this.currentHelper.handleEaseTo(n,a)}handleFlyTo(n,a){return this.currentHelper.handleFlyTo(n,a)}}const rd=(_,n)=>c.C(_,n==null?void 0:n.filter(a=>a.identifier!=="source.canvas")),Bp=c.bN();class Ys extends c.E{constructor(n,a={}){var h,f;super(),this._rtlPluginLoaded=()=>{for(const E in this.tileManagers){const C=this.tileManagers[E].getSource().type;C!=="vector"&&C!=="geojson"||this.tileManagers[E].reload()}},this.map=n,this.dispatcher=new Ct(ht(),n._getMapId()),this.dispatcher.registerMessageHandler("GG",(E,C)=>this.getGlyphs(E,C)),this.dispatcher.registerMessageHandler("GI",(E,C)=>this.getImages(E,C)),this.dispatcher.registerMessageHandler("GDA",(E,C)=>this.getDashes(E,C)),this.imageManager=new Re,this.imageManager.setEventedParent(this);const b=((h=n._container)===null||h===void 0?void 0:h.lang)||typeof document<"u"&&((f=document.documentElement)===null||f===void 0?void 0:f.lang)||void 0;this.glyphManager=new qe(n._requestManager,a.localIdeographFontFamily,b),this.lineAtlas=new Pe(256,512),this.crossTileSymbolIndex=new Xn,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",c.bO()),os().on(fc,this._rtlPluginLoaded),this.on("data",E=>{if(E.dataType!=="source"||E.sourceDataType!=="metadata")return;const C=this.tileManagers[E.sourceId];if(!C)return;const k=C.getSource();if(k!=null&&k.vectorLayerIds)for(const O in this._layers){const F=this._layers[O];F.source===k.id&&this._validateLayer(F)}})}_setInitialValues(){var n;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new c.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((n=this.crossTileSymbolIndex)===null||n===void 0?void 0:n.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(n,a){var h,f,b;this._checkLoaded();const E=a===null?(b=(f=(h=this.stylesheet.state)===null||h===void 0?void 0:h[n])===null||f===void 0?void 0:f.default)!==null&&b!==void 0?b:null:a;if(c.bQ(E,this._globalState[n]))return this;this._globalState[n]=E,this._applyGlobalStateChanges([n])}getGlobalState(){return this._globalState}setGlobalState(n){this._checkLoaded();const a=[];for(const h in n)!c.bQ(this._globalState[h],n[h].default)&&(a.push(h),this._globalState[h]=n[h].default);this._applyGlobalStateChanges(a)}_applyGlobalStateChanges(n){if(n.length===0)return;const a=new Set,h={};for(const f of n){h[f]=this._globalState[f];for(const b in this._layers){const E=this._layers[b],C=E.getLayoutAffectingGlobalStateRefs(),k=E.getPaintAffectingGlobalStateRefs(),O=E.getVisibilityAffectingGlobalStateRefs();if(C.has(f)&&a.add(E.source),k.has(f))for(const{name:F,value:U}of k.get(f))this._updatePaintProperty(E,F,U);O!=null&&O.has(f)&&(E.recalculateVisibility(),this._updateLayer(E))}}this.dispatcher.broadcast("UGS",h);for(const f in this.tileManagers)a.has(f)&&(this._reloadSource(f),this._changed=!0)}loadURL(n){return c._(this,arguments,void 0,function*(a,h={},f){this.fire(new c.n("dataloading",{dataType:"style"})),h.validate=typeof h.validate!="boolean"||h.validate,this._loadStyleRequest=new AbortController;const b=this._loadStyleRequest;try{const E=yield this.map._requestManager.transformRequest(a,"Style");c.bR(b.signal);const C=yield c.k(E,b);this._loadStyleRequest===b&&(this._loadStyleRequest=null),this._load(C.data,h,f)}catch(E){this._loadStyleRequest===b&&(this._loadStyleRequest=null),E&&!b.signal.aborted&&this.fire(new c.l(c.d(E)))}})}loadJSON(n,a={},h){this.fire(new c.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,Z.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,a.validate=a.validate!==!1,this._load(n,a,h)}).catch(()=>{})}loadEmpty(){this.fire(new c.n("dataloading",{dataType:"style"})),this._load(Bp,{validate:!1})}_load(n,a,h){var f,b;let E=a.transformStyle?a.transformStyle(h,n):n;
1252if(!a.validate||!rd(this,c.F(E))){E=Object.assign({},E),this._loaded=!0,this.stylesheet=E;for(const C in E.sources)this.addSource(C,E.sources[C],{validate:!1});E.sprite?this._loadSprite(E.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(E.glyphs),this._createLayers(),this.light=new Ze(this.stylesheet.light),this._setProjectionInternal(((f=this.stylesheet.projection)===null||f===void 0?void 0:f.type)||"mercator"),this.sky=new Ae(this.stylesheet.sky),this.map.setTerrain((b=this.stylesheet.terrain)!==null&&b!==void 0?b:null),this.fire(new c.n("data",{dataType:"style"})),this.fire(new c.n("style.load"))}}_createLayers(){var n,a,h;const f=c.bS(this.stylesheet.layers);this.setGlobalState((n=this.stylesheet.state)!==null&&n!==void 0?n:null),this.dispatcher.broadcast("SL",f),this._order=f.map(b=>b.id),this._layers={},this._serializedLayers=null;for(const b of f){const E=c.bT(b,this._globalState);if(E.setEventedParent(this,{layer:{id:b.id}}),this._layers[b.id]=E,c.bU(E)&&this.tileManagers[E.source]){const C=(h=(a=b.paint)===null||a===void 0?void 0:a["raster-fade-duration"])!==null&&h!==void 0?h:E.paint.get("raster-fade-duration");this.tileManagers[E.source].setRasterFadeDuration(C)}}}_loadSprite(n,a=!1,h=void 0){this.imageManager.setLoaded(!1);const f=new AbortController;let b;this._spriteRequest=f,function(E,C,k,O){return c._(this,void 0,void 0,function*(){const F=ue(E),U=k>1?"@2x":"",$={},H={};for(const{id:oe,url:de}of F){const me=yield C.transformRequest(ce(de,U,".json"),"SpriteJSON");$[oe]=c.k(me,O);const pe=yield C.transformRequest(ce(de,U,".png"),"SpriteImage");H[oe]=Q.getImage(pe,O)}return yield Promise.all([...Object.values($),...Object.values(H)]),function(oe,de){return c._(this,void 0,void 0,function*(){const me={};for(const pe in oe){me[pe]={};const ge=Z.getImageCanvasContext((yield de[pe]).data),we=(yield oe[pe]).data;for(const ye in we){const{width:fe,height:be,x:_e,y:Ie,sdf:je,pixelRatio:Ne,stretchX:Xe,stretchY:He,content:pt,textFitWidth:rt,textFitHeight:Ge}=we[ye];me[pe][ye]={data:null,pixelRatio:Ne,sdf:je,stretchX:Xe,stretchY:He,content:pt,textFitWidth:rt,textFitHeight:Ge,spriteData:{width:fe,height:be,x:_e,y:Ie,context:ge}}}}return me})}($,H)})}(n,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(E=>{if(this._spriteRequest=null,E)for(const C in E){this._spritesImagesIds[C]=[];const k=this._spritesImagesIds[C]?this._spritesImagesIds[C].filter(O=>!(O in E)):[];for(const O of k)this.imageManager.removeImage(O),this._changedImages[O]=!0;for(const O in E[C]){const F=C==="default"?O:`${C}:${O}`;this._spritesImagesIds[C].push(F),F in this.imageManager.images?this.imageManager.updateImage(F,E[C][O],!1):this.imageManager.addImage(F,E[C][O]),a&&(this._changedImages[F]=!0)}}}).catch(E=>{this._spriteRequest=null,b=E,f.signal.aborted||this.fire(new c.l(b))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),a&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.n("data",{dataType:"style"})),h&&h(b)})}_unloadSprite(){for(const n of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(n),this._changedImages[n]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.n("data",{dataType:"style"}))}_validateLayer(n){const a=this.tileManagers[n.source];if(!a)return;const h=n.sourceLayer;if(!h)return;const f=a.getSource();(f.type==="geojson"||f.vectorLayerIds&&!f.vectorLayerIds.includes(h))&&this.fire(new c.l(new Error(`Source layer "${h}" does not exist on source "${f.id}" as specified by style layer "${n.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const n in this.tileManagers)if(!this.tileManagers[n].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(n,a=!1){const h=this._serializedAllLayers();if(!n||n.length===0)return Object.values(a?c.bV(h):h);const f=[];for(const b of n)if(h[b]){const E=a?c.bV(h[b]):h[b];f.push(E)}return f}_serializedAllLayers(){let n=this._serializedLayers;if(n)return n;n=this._serializedLayers={};const a=Object.keys(this._layers);for(const h of a){const f=this._layers[h];f.type!=="custom"&&(n[h]=f.serialize())}return n}hasTransitions(){var n,a,h;if(!((n=this.light)===null||n===void 0)&&n.hasTransition()||!((a=this.sky)===null||a===void 0)&&a.hasTransition()||!((h=this.projection)===null||h===void 0)&&h.hasTransition())return!0;for(const f in this.tileManagers)if(this.tileManagers[f].hasTransition())return!0;for(const f in this._layers)if(this._layers[f].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(n){if(!this._loaded)return;const a=this._changed;if(a){const f=Object.keys(this._updatedLayers),b=Object.keys(this._removedLayers);(f.length||b.length)&&this._updateWorkerLayers(f,b);for(const E in this._updatedSources){const C=this._updatedSources[E];if(C==="reload")this._reloadSource(E);else{if(C!=="clear")throw new Error(`Invalid action ${C}`);this._clearSource(E)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const E in this._updatedPaintProps)this._layers[E].updateTransitions(n);this.light.updateTransitions(n),this.sky.updateTransitions(n),this._resetUpdates()}const h={};for(const f in this.tileManagers){const b=this.tileManagers[f];h[f]=b.used,b.used=!1}for(const f of this._order){const b=this._layers[f];b.recalculate(n,this._availableImages),!b.isHidden(n.zoom)&&b.source&&(this.tileManagers[b.source].used=!0)}for(const f in h){const b=this.tileManagers[f];!!h[f]!=!!b.used&&b.fire(new c.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:f}))}this.light.recalculate(n),this.sky.recalculate(n),this.projection.recalculate(n),this.z=n.zoom,a&&this.fire(new c.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){const n=Object.keys(this._changedImages);if(n.length){for(const a in this.tileManagers)this.tileManagers[a].reloadTilesForDependencies(["icons","patterns"],n);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const n in this.tileManagers)this.tileManagers[n].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(n,a){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(n,!1),removedIds:a})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(n,a={}){var h;this._checkLoaded();const f=this.serialize();if(n=a.transformStyle?a.transformStyle(f,n):n,((h=a.validate)===null||h===void 0||h)&&rd(this,c.F(n)))return!1;(n=c.bV(n)).layers=c.bS(n.layers);const b=c.bW(f,n),E=this._getOperationsToPerform(b);if(E.unimplemented.length>0)throw new Error(`Unimplemented: ${E.unimplemented.join(", ")}.`);
1252if(E.operations.length===0)return!1;for(const C of E.operations)C();return this.stylesheet=n,this._serializedLayers=null,this.fire(new c.n("style.load",{style:this})),!0}_getOperationsToPerform(n){const a=[],h=[];for(const f of n)switch(f.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":a.push(()=>this.addLayer.apply(this,f.args));break;case"removeLayer":a.push(()=>this.removeLayer.apply(this,f.args));break;case"setPaintProperty":a.push(()=>this.setPaintProperty.apply(this,f.args));break;case"setLayoutProperty":a.push(()=>this.setLayoutProperty.apply(this,f.args));break;case"setFilter":a.push(()=>this.setFilter.apply(this,f.args));break;case"addSource":a.push(()=>this.addSource.apply(this,f.args));break;case"removeSource":a.push(()=>this.removeSource.apply(this,f.args));break;case"setLayerZoomRange":a.push(()=>this.setLayerZoomRange.apply(this,f.args));break;case"setLight":a.push(()=>this.setLight.apply(this,f.args));break;case"setGeoJSONSourceData":a.push(()=>this.setGeoJSONSourceData.apply(this,f.args));break;case"setGlyphs":a.push(()=>this.setGlyphs.apply(this,f.args));break;case"setSprite":a.push(()=>this.setSprite.apply(this,f.args));break;case"setTerrain":a.push(()=>this.map.setTerrain.apply(this,f.args));break;case"setSky":a.push(()=>this.setSky.apply(this,f.args));break;case"setProjection":this.setProjection.apply(this,f.args);break;case"setGlobalState":a.push(()=>this.setGlobalState.apply(this,f.args));break;case"setTransition":a.push(()=>{});break;default:h.push(f.command)}return{operations:a,unimplemented:h}}addImage(n,a){if(this.getImage(n))return this.fire(new c.l(new Error(`An image named "${n}" already exists.`)));this.imageManager.addImage(n,a),this._afterImageUpdated(n)}updateImage(n,a){this.imageManager.updateImage(n,a)}getImage(n){return this.imageManager.getImage(n)}removeImage(n){if(!this.getImage(n))return this.fire(new c.l(new Error(`An image named "${n}" does not exist.`)));this.imageManager.removeImage(n),this._afterImageUpdated(n)}_afterImageUpdated(n){this._availableImages=this.imageManager.listImages(),this._changedImages[n]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(n,a,h={}){var f;if(this._checkLoaded(),this.tileManagers[n]!==void 0)throw new Error(`Source "${n}" already exists.`);if(!a.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(a).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(a.type)&&this._validate(c.F.source,`sources.${n}`,a,null,h))return;!((f=this.map)===null||f===void 0)&&f._collectResourceTiming&&(a.collectResourceTiming=!0);const b=this.tileManagers[n]=new un(n,a,this.dispatcher);b.style=this,b.setEventedParent(this,()=>({isSourceLoaded:b.loaded(),source:b.serialize(),sourceId:n})),b.onAdd(this.map),this._changed=!0}removeSource(n){if(this._checkLoaded(),this.tileManagers[n]===void 0)throw new Error(`There is no source with this ID=${n}`);for(const h in this._layers)if(this._layers[h].source===n)return this.fire(new c.l(new Error(`Source "${n}" cannot be removed while layer "${h}" is using it.`)));const a=this.tileManagers[n];delete this.tileManagers[n],delete this._updatedSources[n],a.fire(new c.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:n})),a.setEventedParent(null),a.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(n,a){if(this._checkLoaded(),this.tileManagers[n]===void 0)throw new Error(`There is no source with this ID=${n}`);const h=this.tileManagers[n].getSource();if(h.type!=="geojson")throw new Error(`geojsonSource.type is ${h.type}, which is !== 'geojson`);h.setData(a),this._changed=!0}getSource(n){var a;return(a=this.tileManagers[n])===null||a===void 0?void 0:a.getSource()}addLayer(n,a,h={}){this._checkLoaded();const f=n.id;if(this.getLayer(f))return void this.fire(new c.l(new Error(`Layer "${f}" already exists on this map.`)));let b;if(n.type==="custom"){if(rd(this,c.bX(n)))return;b=c.bT(n,this._globalState)}else{if("source"in n&&typeof n.source=="object"&&(this.addSource(f,n.source),n=c.bV(n),n=c.e(n,{source:f}
vendor: 6,301 bytes, line 1252
1252)),this._validate(c.F.layer,`layers.${f}`,n,{arrayIndex:-1},h))return;b=c.bT(n,this._globalState),this._validateLayer(b),b.setEventedParent(this,{layer:{id:f}})}const E=a?this._order.indexOf(a):this._order.length;if(a&&E===-1)this.fire(new c.l(new Error(`Cannot add layer "${f}" before non-existing layer "${a}".`)));else{if(this._order.splice(E,0,f),this._layerOrderChanged=!0,this._layers[f]=b,this._removedLayers[f]&&b.source&&b.type!=="custom"){const C=this._removedLayers[f];delete this._removedLayers[f],C.type!==b.type?this._updatedSources[b.source]="clear":(this._updatedSources[b.source]="reload",this.tileManagers[b.source].pause())}this._updateLayer(b),b.onAdd&&b.onAdd(this.map)}}moveLayer(n,a){if(this._checkLoaded(),this._changed=!0,!this._layers[n])return void this.fire(new c.l(new Error(`The layer '${n}' does not exist in the map's style and cannot be moved.`)));if(n===a)return;const h=this._order.indexOf(n);this._order.splice(h,1);const f=a?this._order.indexOf(a):this._order.length;a&&f===-1?this.fire(new c.l(new Error(`Cannot move layer "${n}" before non-existing layer "${a}".`))):(this._order.splice(f,0,n),this._layerOrderChanged=!0)}removeLayer(n){this._checkLoaded();const a=this._layers[n];if(!a)return void this.fire(new c.l(new Error(`Cannot remove non-existing layer "${n}".`)));a.setEventedParent(null);const h=this._order.indexOf(n);this._order.splice(h,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[n]=a,delete this._layers[n],this._serializedLayers&&delete this._serializedLayers[n],delete this._updatedLayers[n],delete this._updatedPaintProps[n],a.onRemove&&a.onRemove(this.map)}getLayer(n){return this._layers[n]}getLayersOrder(){return[...this._order]}hasLayer(n){return n in this._layers}setLayerZoomRange(n,a,h){this._checkLoaded();const f=this.getLayer(n);f?f.minzoom===a&&f.maxzoom===h||(a!=null&&(f.minzoom=a),h!=null&&(f.maxzoom=h),this._updateLayer(f)):this.fire(new c.l(new Error(`Cannot set the zoom range of non-existing layer "${n}".`)))}setFilter(n,a,h={}){this._checkLoaded();const f=this.getLayer(n);if(f){if(!c.bQ(f.filter,a))return a==null?(f.setFilter(void 0),void this._updateLayer(f)):void(this._validate(c.F.filter,`layers.${f.id}.filter`,a,null,h)||(f.setFilter(c.bV(a)),this._updateLayer(f)))}else this.fire(new c.l(new Error(`Cannot filter non-existing layer "${n}".`)))}getFilter(n){return c.bV(this.getLayer(n).filter)}setLayoutProperty(n,a,h,f={}){this._checkLoaded();const b=this.getLayer(n);b?c.bQ(b.getLayoutProperty(a),h)||(b.setLayoutProperty(a,h,f),this._updateLayer(b)):this.fire(new c.l(new Error(`Cannot style non-existing layer "${n}".`)))}getLayoutProperty(n,a){const h=this.getLayer(n);if(h)return h.getLayoutProperty(a);this.fire(new c.l(new Error(`Cannot get style of non-existing layer "${n}".`)))}setPaintProperty(n,a,h,f={}){this._checkLoaded();const b=this.getLayer(n);b?c.bQ(b.getPaintProperty(a),h)||this._updatePaintProperty(b,a,h,f):this.fire(new c.l(new Error(`Cannot style non-existing layer "${n}".`)))}_updatePaintProperty(n,a,h,f={}){n.setPaintProperty(a,h,f)&&this._updateLayer(n),c.bU(n)&&a==="raster-fade-duration"&&this.tileManagers[n.source].setRasterFadeDuration(h),this._changed=!0,this._updatedPaintProps[n.id]=!0,this._serializedLayers=null}getPaintProperty(n,a){return this.getLayer(n).getPaintProperty(a)}setFeatureState(n,a){this._checkLoaded();const h=n.source,f=n.sourceLayer,b=this.tileManagers[h];if(b===void 0)return void this.fire(new c.l(new Error(`The source '${h}' does not exist in the map's style.`)));const E=b.getSource().type;E==="geojson"&&f?this.fire(new c.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):E!=="vector"||f?(n.id===void 0&&this.fire(new c.l(new Error("The feature id parameter must be provided."))),b.setFeatureState(f,n.id,a)):this.fire(new c.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(n,a){this._checkLoaded();const h=n.source,f=this.tileManagers[h];if(f===void 0)return void this.fire(new c.l(new Error(`The source '${h}' does not exist in the map's style.`)));const b=f.getSource().type,E=b==="vector"?n.sourceLayer:void 0;b!=="vector"||E?a&&typeof n.id!="string"&&typeof n.id!="number"?this.fire(new c.l(new Error("A feature id is required to remove its specific state property."))):f.removeFeatureState(E,n.id,a):this.fire(new c.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(n){this._checkLoaded();const a=n.source,h=n.sourceLayer,f=this.tileManagers[a];if(f!==void 0)return f.getSource().type!=="vector"||h?(n.id===void 0&&this.fire(new c.l(new Error("The feature id parameter must be provided."))),f.getFeatureState(h,n.id)):void this.fire(new c.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new c.l(new Error(`The source '${a}' does not exist in the map's style.`)))}getTransition(){var n;return c.e({duration:300,delay:0},(n=this.stylesheet)===null||n===void 0?void 0:n.transition)}serialize(){if(!this._loaded)return;const n=c.bY(this.tileManagers,b=>b.serialize()),a=this._serializeByIds(this._order,!0),h=this.map.getTerrain()||void 0,f=this.stylesheet;return c.bZ({version:f.version,name:f.name,metadata:f.metadata,light:f.light,sky:f.sky,center:f.center,zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,sprite:f.sprite,glyphs:f.glyphs,transition:f.transition,projection:f.projection,sources:n,layers:a,terrain:h},b=>b!==void 0)}_updateLayer(n){this._updatedLayers[n.id]=!0,n.source&&!this._updatedSources[n.source]&&this.tileManagers[n.source].getSource().type!=="raster"&&(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(n){const a=E=>this._layers[E].type==="fill-extrusion",h={},f=[];for(let E=this._order.length-1;E>=0;E--){const C=this._order[E];if(a(C)){h[C]=E;for(const k of n){const O=k[C];if(O)for(const F of O)f.push(F)}}}f.sort((E,C)=>C.intersectionZ-E.intersectionZ);const b=[];for(let E=this._order.length-1;E>=0;E--){const C=this._order[E];if(a(C))for(let k=f.length-1;k>=0;k--){const O=f[k].feature;if(h[O.layer.id]<E)break;b.push(O),f.pop()}else for(const k of n){const O=k[C];if(O)for(const F of O)b.push(F.feature)}}return b}
1252queryRenderedFeatures(n,a,h){a!=null&&a.filter&&this._validate(c.F.filter,"queryRenderedFeatures.filter",a.filter,null,a);const f={};if(a!=null&&a.layers){if(!(Array.isArray(a.layers)||a.layers instanceof Set))return this.fire(new c.l(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const O of a.layers){const F=this._layers[O];if(!F)return this.fire(new c.l(new Error(`The layer '${O}' does not exist in the map's style and cannot be queried for features.`))),[];f[F.source]=!0}}const b=[];a.availableImages=this._availableImages;const E=this._serializedAllLayers(),C=a.layers instanceof Set?a.layers:Array.isArray(a.layers)?new Set(a.layers):null,k=Object.assign(Object.assign({},a),{layers:C,globalState:this._globalState});for(const O in this.tileManagers)a.layers&&!f[O]||b.push(zt(this.tileManagers[O],this._layers,E,n,k,h,this.map.terrain?(F,U,$)=>this.map.terrain.getElevation(F,U,$):void 0));return this.placement&&b.push(function(O,F,U,$,H,oe,de){const me={},pe=oe.queryRenderedSymbols($),ge=[];for(const we of Object.keys(pe).map(Number))ge.push(de[we]);ge.sort(xn);for(const we of ge){const ye=we.featureIndex.lookupSymbolFeatures(pe[we.bucketInstanceId],F,we.bucketIndex,we.sourceLayerIndex,{filterSpec:H.filter,globalState:H.globalState},H.layers,H.availableImages,O);for(const fe in ye){me[fe]||(me[fe]=[]);const be=ye[fe];be.sort((_e,Ie)=>{const je=we.featureSortOrder;if(je){const Ne=je.indexOf(_e.featureIndex);return je.indexOf(Ie.featureIndex)-Ne}return Ie.featureIndex-_e.featureIndex});for(const _e of be)me[fe].push(_e)}}return function(we,ye,fe){for(const be in we)for(const _e of we[be])Bi(_e,fe[ye[be].source]);return we}(me,O,U)}(this._layers,E,this.tileManagers,n,k,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(b)}querySourceFeatures(n,a){a!=null&&a.filter&&this._validate(c.F.filter,"querySourceFeatures.filter",a.filter,null,a);const h=this.tileManagers[n];return h?function(f,b){const E=f.getRenderableIds().map(O=>f.getTileByID(O)),C=[],k={};for(const O of E){const F=O.tileID.canonical.key;k[F]||(k[F]=!0,O.querySourceFeatures(C,b))}return C}(h,a?Object.assign(Object.assign({},a),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(n,a={}){this._checkLoaded();const h=this.light.getLight();let f=!1;for(const E in n)if(!c.bQ(n[E],h[E])){f=!0;break}if(!f)return;const b={now:Y(),transition:c.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(n,a),this.light.updateTransitions(b)}getProjection(){var n;return(n=this.stylesheet)===null||n===void 0?void 0:n.projection}setProjection(n){this._checkLoaded();const a=n??{type:"mercator"};if(this.stylesheet.projection=n,this.projection){if(this.projection.name===a.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(a.type)}getSky(){var n;return(n=this.stylesheet)===null||n===void 0?void 0:n.sky}setSky(n,a={}){this._checkLoaded();const h=this.getSky();let f=!1;if(!n&&!h)return;if(n&&!h)f=!0;else if(!n&&h)f=!0;else for(const E in n)if(!c.bQ(n[E],h[E])){f=!0;break}if(!f)return;const b={now:Y(),transition:c.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=n,this.sky.setSky(n,a),this.sky.updateTransitions(b)}_setProjectionInternal(n){const a=function(h,f){const b={constrainOverride:f};if(Array.isArray(h)){const E=new Og({type:h});return{projection:E,transform:new tl(b),cameraHelper:new Gi(E)}}switch(h){case"mercator":return{projection:new On,transform:new Ws(b),cameraHelper:new Zs};case"globe":{const E=new Og({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:E,transform:new tl(b),cameraHelper:new Gi(E)}}case"vertical-perspective":return{projection:new Qu,transform:new Ks(b),cameraHelper:new li};default:return c.w(`Unknown projection name: ${h}. Falling back to mercator projection.`),{projection:new On,transform:new Ws(b),cameraHelper:new Zs}}}(n,this.map.transformConstrain);this.projection=a.projection,this.map.migrateProjection(a.transform,a.cameraHelper);for(const h in this.tileManagers)this.tileManagers[h].reload()}_validate(n,a,h,f,b={}){return(b==null?void 0:b.validate)!==!1&&rd(this,n.call(c.F,c.e({key:a,style:this.serialize(),value:h,styleSpec:c.x},f)))}_remove(n=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),os().off(fc,this._rtlPluginLoaded);for(const a in this._layers)this._layers[a].setEventedParent(null);for(const a in this.tileManagers){const h=this.tileManagers[a];h.setEventedParent(null),h.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),n&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(n)}_clearSource(n){this.tileManagers[n].clearTiles()}_reloadSource(n){this.tileManagers[n].resume(),this.tileManagers[n].reload()}_updateSources(n){for(const a in this.tileManagers)this.tileManagers[a].update(n,this.map.terrain)}_generateCollisionBoxes(){for(const n in this.tileManagers)this._reloadSource(n)}_updatePlacement(n,a,h,f,b=!1){let E=!1,C=!1;const k={};for(const O of this._order){const F=this._layers[O];if(F.type!=="symbol")continue;if(!k[F.source]){const $=this.tileManagers[F.source];k[F.source]=$.getRenderableIds(!0).map(H=>$.getTileByID(H)).sort((H,oe)=>oe.tileID.overscaledZ-H.tileID.overscaledZ||(H.tileID.isLessThan(oe.tileID)?-1:1))}const U=this.crossTileSymbolIndex.addLayer(F,k[F.source],n.center.lng);E||(E=U)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),b||(b=this._layerOrderChanged||h===0),(b||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(Y(),n.zoom))&&(this.pauseablePlacement=new Ha(n,this.map.terrain,this._order,b,a,h,f,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,k),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(Y()),C=!0),E&&this.pauseablePlacement.placement.setStale()),
1252C||E)for(const O of this._order){const F=this._layers[O];F.type==="symbol"&&this.placement.updateLayerOpacities(F,k[F.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(Y())}_releaseSymbolFadeTiles(){for(const n in this.tileManagers)this.tileManagers[n].releaseSymbolFadeTiles()}getImages(n,a){return c._(this,void 0,void 0,function*(){const h=yield this.imageManager.getImages(a.icons);this._updateTilesForChangedImages();const f=this.tileManagers[a.source];return f&&f.setDependencies(a.tileID.key,a.type,a.icons),h})}getGlyphs(n,a){return c._(this,void 0,void 0,function*(){const h=yield this.glyphManager.getGlyphs(a.stacks),f=this.tileManagers[a.source];return f&&f.setDependencies(a.tileID.key,a.type,[""]),h})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(n,a={}){this._checkLoaded(),n&&this._validate(c.F.glyphs,"glyphs",n,null,a)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=n,this.glyphManager.entries={},this.glyphManager.setURL(n))}getDashes(n,a){return c._(this,void 0,void 0,function*(){const h={};for(const[f,b]of Object.entries(a.dashes))h[f]=this.lineAtlas.getDash(b.dasharray,b.round);return h})}addSprite(n,a,h={},f){this._checkLoaded();const b=[{id:n,url:a}],E=[...ue(this.stylesheet.sprite),...b];this._validate(c.F.sprite,"sprite",E,null,h)||(this.stylesheet.sprite=E,this._loadSprite(b,!0,f))}removeSprite(n){this._checkLoaded();const a=ue(this.stylesheet.sprite);if(a.find(h=>h.id===n)){if(this._spritesImagesIds[n])for(const h of this._spritesImagesIds[n])this.imageManager.removeImage(h),this._changedImages[h]=!0;a.splice(a.findIndex(h=>h.id===n),1),this.stylesheet.sprite=a.length>0?a:void 0,delete this._spritesImagesIds[n],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new c.n("data",{dataType:"style"}))}else this.fire(new c.l(new Error(`Sprite "${n}" doesn't exists on this map.`)))}getSprite(){return ue(this.stylesheet.sprite)}setSprite(n,a={},h){this._checkLoaded(),n&&this._validate(c.F.sprite,"sprite",n,null,a)||(this.stylesheet.sprite=n,n?this._loadSprite(n,!0,h):(this._unloadSprite(),h&&h(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(const n in this.tileManagers){const a=this.tileManagers[n];a.setEventedParent(null),a.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(const n in this._layers){const a=this._layers[n];a.setEventedParent(null),a.onRemove&&a.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var Pc=c.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class j0{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(n,a,h,f,b,E,C,k,O){this.context=n;let F=this.boundPaintVertexBuffers.length!==f.length;for(let U=0;!F&&U<f.length;U++)this.boundPaintVertexBuffers[U]!==f[U]&&(F=!0);!this.vao||this.boundProgram!==a||this.boundLayoutVertexBuffer!==h||F||this.boundIndexBuffer!==b||this.boundVertexOffset!==E||this.boundDynamicVertexBuffer!==C||this.boundDynamicVertexBuffer2!==k||this.boundDynamicVertexBuffer3!==O?this.freshBind(a,h,f,b,E,C,k,O):(n.bindVertexArray.set(this.vao),C&&C.bind(),b!=null&&b.dynamicDraw&&b.bind(),k&&k.bind(),O&&O.bind())}freshBind(n,a,h,f,b,E,C,k){const O=n.numAttributes,F=this.context,U=F.gl;this.vao&&this.destroy(),this.vao=F.createVertexArray(),F.bindVertexArray.set(this.vao),this.boundProgram=n,this.boundLayoutVertexBuffer=a,this.boundPaintVertexBuffers=h,this.boundIndexBuffer=f,this.boundVertexOffset=b,this.boundDynamicVertexBuffer=E,this.boundDynamicVertexBuffer2=C,this.boundDynamicVertexBuffer3=k,a.enableAttributes(U,n);for(const $ of h)$.enableAttributes(U,n);E&&E.enableAttributes(U,n),C&&C.enableAttributes(U,n),k&&k.enableAttributes(U,n),a.bind(),a.setVertexAttribPointers(U,n,b);for(const $ of h)$.bind(),$.setVertexAttribPointers(U,n,b);
1252E&&(E.bind(),E.setVertexAttribPointers(U,n,b)),f&&f.bind(),C&&(C.bind(),C.setVertexAttribPointers(U,n,b)),k&&(k.bind(),k.setVertexAttribPointers(U,n,b)),F.currentNumAttributes=O}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const nd=(_,n,a,h,f)=>({u_texture:0,u_ele_delta:_,u_fog_matrix:n,u_fog_color:a?a.properties.get("fog-color"):c.bo.white,u_fog_ground_blend:a?a.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:f?0:a?a.calculateFogBlendOpacity(h):0,u_horizon_color:a?a.properties.get("horizon-color"):c.bo.white,u_horizon_fog_blend:a?a.properties.get("horizon-fog-blend"):1,u_is_globe_mode:f?1:0}),N0={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ko(_){const n=[];for(const a of _){if(a===null)continue;const h=a.split(" ");n.push(h.pop())}return n}class B0{constructor(n,a,h,f,b,E,C,k,O=[]){const F=n.gl;this.program=F.createProgram();const U=ko(a.staticAttributes),$=h?h.getBinderAttributes():[],H=U.concat($),oe=gr.prelude.staticUniforms?ko(gr.prelude.staticUniforms):[],de=C.staticUniforms?ko(C.staticUniforms):[],me=a.staticUniforms?ko(a.staticUniforms):[],pe=h?h.getBinderUniforms():[],ge=oe.concat(de).concat(me).concat(pe),we=[];for(const Ne of ge)we.includes(Ne)||we.push(Ne);const ye=h?h.defines():[];$i(F)&&ye.unshift("#version 300 es"),b&&ye.push("#define OVERDRAW_INSPECTOR;"),E&&ye.push("#define TERRAIN3D;"),k&&ye.push(k),O&&ye.push(...O);let fe=ye.concat(gr.prelude.fragmentSource,C.fragmentSource,a.fragmentSource).join(`
1253`),be=ye.concat(gr.prelude.vertexSource,C.vertexSource,a.vertexSource).join(`
1254`);$i(F)||(fe=function(Ne){return Ne.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(fe),be=function(Ne){return Ne.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(be));const _e=F.createShader(F.FRAGMENT_SHADER);if(F.isContextLost())return void(this.failedToCreate=!0);if(F.shaderSource(_e,fe),F.compileShader(_e),!F.getShaderParameter(_e,F.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${F.getShaderInfoLog(_e)}`);F.attachShader(this.program,_e);const Ie=F.createShader(F.VERTEX_SHADER);if(F.isContextLost())return void(this.failedToCreate=!0);if(F.shaderSource(Ie,be),F.compileShader(Ie),!F.getShaderParameter(Ie,F.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${F.getShaderInfoLog(Ie)}`);F.attachShader(this.program,Ie),this.attributes={};const je={};this.numAttributes=H.length;for(let Ne=0;Ne<this.numAttributes;Ne++)H[Ne]&&(F.bindAttribLocation(this.program,Ne,H[Ne]),this.attributes[H[Ne]]=Ne);if(F.linkProgram(this.program),!F.getProgramParameter(this.program,F.LINK_STATUS))throw new Error(`Program failed to link: ${F.getProgramInfoLog(this.program)}`);F.deleteShader(Ie),F.deleteShader(_e);for(const Ne of we)if(Ne&&!je[Ne]){const Xe=F.getUniformLocation(this.program,Ne);Xe&&(je[Ne]=Xe)}this.fixedUniforms=f(n,je),this.terrainUniforms=((Ne,Xe)=>({u_depth:new c.b_(Ne,Xe.u_depth),u_terrain:new c.b_(Ne,Xe.u_terrain),u_terrain_dim:new c.bp(Ne,Xe.u_terrain_dim),u_terrain_matrix:new c.c0(Ne,Xe.u_terrain_matrix),u_terrain_unpack:new c.c1(Ne,Xe.u_terrain_unpack),u_terrain_exaggeration:new c.bp(Ne,Xe.u_terrain_exaggeration)}))(n,je),this.projectionUniforms=((Ne,Xe)=>({u_projection_matrix:new c.c0(Ne,Xe.u_projection_matrix),u_projection_tile_mercator_coords:new c.c1(Ne,Xe.u_projection_tile_mercator_coords),u_projection_clipping_plane:new c.c1(Ne,Xe.u_projection_clipping_plane),u_projection_transition:new c.bp(Ne,Xe.u_projection_transition),u_projection_fallback_matrix:new c.c0(Ne,Xe.u_projection_fallback_matrix)}))(n,je),this.binderUniforms=h?h.getUniforms(n,je):[]}draw(n,a,h,f,b,E,C,k,O,F,U,$,H,oe,de,me,pe,ge,we){var ye;const fe=n.gl;if(this.failedToCreate)return;if(n.program.set(this.program),n.setDepthMode(h),n.setStencilMode(f),n.setColorMode(b),n.setCullFace(E),k){n.activeTexture.set(fe.TEXTURE2),fe.bindTexture(fe.TEXTURE_2D,k.depthTexture),n.activeTexture.set(fe.TEXTURE3),fe.bindTexture(fe.TEXTURE_2D,k.texture);for(const _e in this.terrainUniforms)this.terrainUniforms[_e].set(k[_e])}if(O)for(const _e in O)this.projectionUniforms[N0[_e]].set(O[_e]);if(C)for(const _e in this.fixedUniforms)this.fixedUniforms[_e].set(C[_e]);me&&me.setUniforms(n,this.binderUniforms,oe,{zoom:de});let be=0;switch(a){case fe.LINES:be=2;break;case fe.TRIANGLES:be=3;break;case fe.LINE_STRIP:be=1}for(const _e of H.get())_e.vaos||(_e.vaos={}),(ye=_e.vaos)[F]||(ye[F]=new j0),_e.vaos[F].bind(n,this,U,me?me.getPaintVertexBuffers():[],$,_e.vertexOffset,pe,ge,we),fe.drawElements(a,_e.primitiveLength*be,fe.UNSIGNED_SHORT,_e.primitiveOffset*be*2)}}function Vp(_,n,a){const h=1/c.aK(a,1,n.transform.tileZoom),f=Math.pow(2,a.tileID.overscaledZ
vendor: 5,686 bytes, line 1254
1254),b=a.tileSize*Math.pow(2,n.transform.tileZoom)/f,E=b*(a.tileID.canonical.x+a.tileID.wrap*f),C=b*a.tileID.canonical.y;return{u_image:0,u_texsize:a.imageAtlasTexture.size,u_scale:[h,_.fromScale,_.toScale],u_fade:_.t,u_pixel_coord_upper:[E>>16,C>>16],u_pixel_coord_lower:[65535&E,65535&C]}}const Ng=(_,n,a,h)=>{const f=_.style.light,b=f.properties.get("position"),E=[b.x,b.y,b.z],C=c.c4();f.properties.get("anchor")==="viewport"&&c.c5(C,_.transform.bearingInRadians),c.c6(E,E,C);const k=_.transform.transformLightDirection(E),O=f.properties.get("color");return{u_lightpos:E,u_lightpos_globe:k,u_lightintensity:f.properties.get("intensity"),u_lightcolor:[O.r,O.g,O.b],u_vertical_gradient:+n,u_opacity:a,u_fill_translate:h}},Bg=(_,n,a,h,f,b,E)=>c.e(Ng(_,n,a,h),Vp(b,_,E),{u_height_factor:-Math.pow(2,f.overscaledZ)/E.tileSize/8}),id=(_,n,a,h)=>c.e(Vp(n,_,a),{u_fill_translate:h}),Vg=(_,n)=>({u_world:_,u_fill_translate:n}),Ug=(_,n,a,h,f)=>c.e(id(_,n,a,f),{u_world:h}),$g=(_,n,a,h,f)=>{const b=_.transform;let E,C,k=0;if(a.paint.get("circle-pitch-alignment")==="map"){const O=c.aK(n,1,b.zoom);E=!0,C=[O,O],k=O/(c.a6*Math.pow(2,n.tileID.overscaledZ))*2*Math.PI*f}else E=!1,C=b.pixelsToGLUnits;return{u_camera_to_center_distance:b.cameraToCenterDistance,u_scale_with_map:+(a.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+E,u_device_pixel_ratio:_.pixelRatio,u_extrude_scale:C,u_globe_extrude_scale:k,u_translate:h}},Gg=_=>({u_pixel_extrude_scale:[1/_.width,1/_.height]}),Qs=_=>({u_viewport_size:[_.width,_.height]}),Up=(_,n=1)=>({u_color:_,u_overlay:0,u_overlay_scale:n}),$p=(_,n,a,h)=>{const f=c.aK(_,1,n)/(c.a6*Math.pow(2,_.tileID.overscaledZ))*2*Math.PI*h;return{u_extrude_scale:c.aK(_,1,n),u_intensity:a,u_globe_extrude_scale:f}},rl=(_,n,a,h)=>{const f=c.O();c.c7(f,0,_.width,_.height,0,0,1);const b=_.context.gl;return{u_matrix:f,u_world:[b.drawingBufferWidth,b.drawingBufferHeight],u_image:a,u_color_ramp:h,u_opacity:n.paint.get("heatmap-opacity")}},V0=(_,n,a)=>{const h=a.paint.get("hillshade-accent-color");let f;switch(a.paint.get("hillshade-method")){case"basic":f=4;break;case"combined":f=1;break;case"igor":f=2;break;case"multidirectional":f=3;break;default:f=0}const b=a.getIlluminationProperties();for(let E=0;E<b.directionRadians.length;E++)a.paint.get("hillshade-illumination-anchor")==="viewport"&&(b.directionRadians[E]+=_.transform.bearingInRadians);return{u_image:0,u_latrange:U0(0,n.tileID),u_exaggeration:a.paint.get("hillshade-exaggeration"),u_altitudes:b.altitudeRadians,u_azimuths:b.directionRadians,u_accent:h,u_method:f,u_highlights:b.highlightColor,u_shadows:b.shadowColor}},od=(_,n)=>{const a=n.stride,h=c.O();return c.c7(h,0,c.a6,-c.a6,0,0,1),c.Q(h,h,[0,-c.a6,0]),{u_matrix:h,u_image:1,u_dimension:[a,a],u_zoom:_.overscaledZ,u_unpack:n.getUnpackVector()}};function U0(_,n){const a=Math.pow(2,n.canonical.z),h=n.canonical.y;return[new c.a7(0,h/a).toLngLat().lat,new c.a7(0,(h+1)/a).toLngLat().lat]}const $0=(_,n,a=0)=>({u_image:0,u_unpack:n.getUnpackVector(),u_dimension:[n.stride,n.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:a,u_opacity:_.paint.get("color-relief-opacity")}),Cc=(_,n,a,h)=>{const f=_.transform;return{u_translation:uo(_,n,a),u_ratio:h/c.aK(n,1,f.zoom),u_device_pixel_ratio:_.pixelRatio,u_units_to_pixels:[1/f.pixelsToGLUnits[0],1/f.pixelsToGLUnits[1]]}},qg=(_,n,a,h,f)=>c.e(Cc(_,n,a,h),{u_image:0,u_image_height:f}),Wg=(_,n,a,h,f)=>{const b=_.transform,E=nl(n,b);return{u_translation:uo(_,n,a),u_texsize:n.imageAtlasTexture.size,u_ratio:h/c.aK(n,1,b.zoom),u_device_pixel_ratio:_.pixelRatio,u_image:0,u_scale:[E,f.fromScale,f.toScale],u_fade:f.t,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},Gp=(_,n,a,h,f)=>{const b=nl(n,_.transform);return c.e(Cc(_,n,a,h),{u_tileratio:b,u_crossfade_from:f.fromScale,u_crossfade_to:f.toScale,u_image:0,u_mix:f.t,u_lineatlas_width:_.lineAtlas.width,u_lineatlas_height:_.lineAtlas.height})},Zg=(_,n,a,h,f,b)=>{const E=nl(n,_.transform);return c.e(Cc(_,n,a,h),{u_image:0,u_image_height:b,u_tileratio:E,u_crossfade_from:f.fromScale,u_crossfade_to:f.toScale,u_image_dash:1,u_mix:f.t,u_lineatlas_width:_.lineAtlas.width,u_lineatlas_height:_.lineAtlas.height})};function nl(_,n){return 1/c.aK(_,1,n.tileZoom)}function uo(_,n,a){return c.aL(_.transform,n,a.paint.get("line-translate"),a.paint.get("line-translate-anchor"))}const qp=(_,n,a,h,f)=>{return{u_tl_parent:_,u_scale_parent:n,u_buffer_scale:1,u_fade_t:a.mix,u_opacity:a.opacity*h.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:h.paint.get("raster-brightness-min"),u_brightness_high:h.paint.get("raster-brightness-max"),u_saturation_factor:(E=h.paint.get("raster-saturation"),E>0?1-1/(1.001-E):-E),u_contrast_factor:(b=h.paint.get("raster-contrast"),b>0?1/(1-b):1+b),u_spin_weights:Wp(h.paint.get("raster-hue-rotate")),u_coords_top:[f[0].x,f[0].y,f[1].x,f[1].y],u_coords_bottom:[f[3].x,f[3].y,f[2].x,f[2].y]};var b,E};function Wp(_){_*=Math.PI/180;const n=Math.sin(_),a=Math.cos(_);return[(2*a+1)/3,(-Math.sqrt(3)*n-a+1)/3,(Math.sqrt(3)*n-a+1)/3]}const sd=(_,n,a,h,f,b,E,C,k,O,F,U,$)=>{const H=E.transform;return{u_is_size_zoom_constant:+(_==="constant"||_==="source"),u_is_size_feature_constant:+(_==="constant"||_==="camera"),u_size_t:n?n.uSizeT:0,u_size:n?n.uSize:0,u_camera_to_center_distance:H.cameraToCenterDistance,u_pitch:H.pitch/360*2*Math.PI,u_rotate_symbol:+a,u_aspect_ratio:H.width/H.height,u_fade_change:E.options.fadeDuration?E.symbolFadeChange:1,u_label_plane_matrix:C,u_coord_matrix:k,u_is_text:+F,u_pitch_with_map:+h,u_is_along_line:f,u_is_variable_anchor:b,u_texsize:U,u_texture:0,u_translation:O,u_pitched_scale:$}},Zp=(_,n,a,h,f,b,E,C,k,O,F,U,$,H)=>{const oe=E.transform;
vendor: 4,205 bytes, line 1254
1254return c.e(sd(_,n,a,h,f,b,E,C,k,O,F,U,H),{u_gamma_scale:h?Math.cos(oe.pitch*Math.PI/180)*oe.cameraToCenterDistance:1,u_device_pixel_ratio:E.pixelRatio,u_is_halo:$?1:0,u_is_plain:1})},Hp=(_,n,a,h,f,b,E,C,k,O,F,U,$)=>c.e(Zp(_,n,a,h,f,b,E,C,k,O,!0,F,!0,$),{u_texsize_icon:U,u_texture_icon:1}),Js=(_,n)=>({u_opacity:_,u_color:n}),Xp=(_,n,a,h,f)=>c.e(function(b,E,C,k){const O=C.imageManager.getPattern(b.from.toString()),F=C.imageManager.getPattern(b.to.toString()),{width:U,height:$}=C.imageManager.getPixelSize(),H=Math.pow(2,k.tileID.overscaledZ),oe=k.tileSize*Math.pow(2,C.transform.tileZoom)/H,de=oe*(k.tileID.canonical.x+k.tileID.wrap*H),me=oe*k.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:O.tl,u_pattern_br_a:O.br,u_pattern_tl_b:F.tl,u_pattern_br_b:F.br,u_texsize:[U,$],u_mix:E.t,u_pattern_size_a:O.displaySize,u_pattern_size_b:F.displaySize,u_scale_a:E.fromScale,u_scale_b:E.toScale,u_tile_units_to_pixels:1/c.aK(k,1,C.transform.tileZoom),u_pixel_coord_upper:[de>>16,me>>16],u_pixel_coord_lower:[65535&de,65535&me]}}(a,f,n,h),{u_opacity:_}),Hg=(_,n)=>{},G0={fillExtrusion:(_,n)=>({u_lightpos:new c.c2(_,n.u_lightpos),u_lightpos_globe:new c.c2(_,n.u_lightpos_globe),u_lightintensity:new c.bp(_,n.u_lightintensity),u_lightcolor:new c.c2(_,n.u_lightcolor),u_vertical_gradient:new c.bp(_,n.u_vertical_gradient),u_opacity:new c.bp(_,n.u_opacity),u_fill_translate:new c.c3(_,n.u_fill_translate)}),fillExtrusionPattern:(_,n)=>({u_lightpos:new c.c2(_,n.u_lightpos),u_lightpos_globe:new c.c2(_,n.u_lightpos_globe),u_lightintensity:new c.bp(_,n.u_lightintensity),u_lightcolor:new c.c2(_,n.u_lightcolor),u_vertical_gradient:new c.bp(_,n.u_vertical_gradient),u_height_factor:new c.bp(_,n.u_height_factor),u_opacity:new c.bp(_,n.u_opacity),u_fill_translate:new c.c3(_,n.u_fill_translate),u_image:new c.b_(_,n.u_image),u_texsize:new c.c3(_,n.u_texsize),u_pixel_coord_upper:new c.c3(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new c.c3(_,n.u_pixel_coord_lower),u_scale:new c.c2(_,n.u_scale),u_fade:new c.bp(_,n.u_fade)}),fill:(_,n)=>({u_fill_translate:new c.c3(_,n.u_fill_translate)}),fillPattern:(_,n)=>({u_image:new c.b_(_,n.u_image),u_texsize:new c.c3(_,n.u_texsize),u_pixel_coord_upper:new c.c3(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new c.c3(_,n.u_pixel_coord_lower),u_scale:new c.c2(_,n.u_scale),u_fade:new c.bp(_,n.u_fade),u_fill_translate:new c.c3(_,n.u_fill_translate)}),fillOutline:(_,n)=>({u_world:new c.c3(_,n.u_world),u_fill_translate:new c.c3(_,n.u_fill_translate)}),fillOutlinePattern:(_,n)=>({u_world:new c.c3(_,n.u_world),u_image:new c.b_(_,n.u_image),u_texsize:new c.c3(_,n.u_texsize),u_pixel_coord_upper:new c.c3(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new c.c3(_,n.u_pixel_coord_lower),u_scale:new c.c2(_,n.u_scale),u_fade:new c.bp(_,n.u_fade),u_fill_translate:new c.c3(_,n.u_fill_translate)}),circle:(_,n)=>({u_camera_to_center_distance:new c.bp(_,n.u_camera_to_center_distance),u_scale_with_map:new c.b_(_,n.u_scale_with_map),u_pitch_with_map:new c.b_(_,n.u_pitch_with_map),u_extrude_scale:new c.c3(_,n.u_extrude_scale),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_globe_extrude_scale:new c.bp(_,n.u_globe_extrude_scale),u_translate:new c.c3(_,n.u_translate)}),collisionBox:(_,n)=>({u_pixel_extrude_scale:new c.c3(_,n.u_pixel_extrude_scale)}),collisionCircle:(_,n)=>({u_viewport_size:new c.c3(_,n.u_viewport_size)}),debug:(_,n)=>({u_color:new c.b$(_,n.u_color),u_overlay:new c.b_(_,n.u_overlay),u_overlay_scale:new c.bp(_,n.u_overlay_scale)}),depth:Hg,clippingMask:Hg,heatmap:(_,n)=>({u_extrude_scale:new c.bp(_,n.u_extrude_scale),u_intensity:new c.bp(_,n.u_intensity),u_globe_extrude_scale:new c.bp(_,n.u_globe_extrude_scale)}),heatmapTexture:(_,n)=>({u_matrix:new c.c0(_,n.u_matrix),u_world:new c.c3(_,n.u_world),u_image:new c.b_(_,n.u_image),u_color_ramp:new c.b_(_,n.u_color_ramp),u_opacity:new c.bp(_,n.u_opacity)}),hillshade:(_,n)=>({u_image:new c.b_(_,n.u_image),u_latrange:new c.c3(_,n.u_latrange),u_exaggeration:new c.bp(_,n.u_exaggeration),u_altitudes:new c.c9(_,n.u_altitudes),u_azimuths:new c.c9(_,n.u_azimuths),u_accent:new c.b$(_,n.u_accent),u_method:new c.b_(_,n.u_method),u_shadows:new c.c8(_,n.u_shadows),u_highlights:new c.c8(_,n.u_highlights)}
1254),hillshadePrepare:(_,n)=>({u_matrix:new c.c0(_,n.u_matrix),u_image:new c.b_(_,n.u_image),u_dimension:new c.c3(_,n.u_dimension),u_zoom:new c.bp(_,n.u_zoom),u_unpack:new c.c1(_,n.u_unpack)}),colorRelief:(_,n)=>({u_image:new c.b_(_,n.u_image),u_unpack:new c.c1(_,n.u_unpack),u_dimension:new c.c3(_,n.u_dimension),u_elevation_stops:new c.b_(_,n.u_elevation_stops),u_color_stops:new c.b_(_,n.u_color_stops),u_color_ramp_size:new c.b_(_,n.u_color_ramp_size),u_opacity:new c.bp(_,n.u_opacity)}),line:(_,n)=>({u_translation:new c.c3(_,n.u_translation),u_ratio:new c.bp(_,n.u_ratio),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_units_to_pixels:new c.c3(_,n.u_units_to_pixels)}),lineGradient:(_,n)=>({u_translation:new c.c3(_,n.u_translation),u_ratio:new c.bp(_,n.u_ratio),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_units_to_pixels:new c.c3(_,n.u_units_to_pixels),u_image:new c.b_(_,n.u_image),u_image_height:new c.bp(_,n.u_image_height)}),linePattern:(_,n)=>({u_translation:new c.c3(_,n.u_translation),u_texsize:new c.c3(_,n.u_texsize),u_ratio:new c.bp(_,n.u_ratio),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_image:new c.b_(_,n.u_image),u_units_to_pixels:new c.c3(_,n.u_units_to_pixels),u_scale:new c.c2(_,n.u_scale),u_fade:new c.bp(_,n.u_fade)}),lineSDF:(_,n)=>({u_translation:new c.c3(_,n.u_translation),u_ratio:new c.bp(_,n.u_ratio),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_units_to_pixels:new c.c3(_,n.u_units_to_pixels),u_image:new c.b_(_,n.u_image),u_mix:new c.bp(_,n.u_mix),u_tileratio:new c.bp(_,n.u_tileratio),u_crossfade_from:new c.bp(_,n.u_crossfade_from),u_crossfade_to:new c.bp(_,n.u_crossfade_to),u_lineatlas_width:new c.bp(_,n.u_lineatlas_width),u_lineatlas_height:new c.bp(_,n.u_lineatlas_height)}),lineGradientSDF:(_,n)=>({u_translation:new c.c3(_,n.u_translation),u_ratio:new c.bp(_,n.u_ratio),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_units_to_pixels:new c.c3(_,n.u_units_to_pixels),u_image:new c.b_(_,n.u_image),u_image_height:new c.bp(_,n.u_image_height),u_tileratio:new c.bp(_,n.u_tileratio),u_crossfade_from:new c.bp(_,n.u_crossfade_from),u_crossfade_to:new c.bp(_,n.u_crossfade_to),u_image_dash:new c.b_(_,n.u_image_dash),u_mix:new c.bp(_,n.u_mix),u_lineatlas_width:new c.bp(_,n.u_lineatlas_width),u_lineatlas_height:new c.bp(_,n.u_lineatlas_height)}),raster:(_,n)=>({u_tl_parent:new c.c3(_,n.u_tl_parent),u_scale_parent:new c.bp(_,n.u_scale_parent),u_buffer_scale:new c.bp(_,n.u_buffer_scale),u_fade_t:new c.bp(_,n.u_fade_t),u_opacity:new c.bp(_,n.u_opacity),u_image0:new c.b_(_,n.u_image0),u_image1:new c.b_(_,n.u_image1),u_brightness_low:new c.bp(_,n.u_brightness_low),u_brightness_high:new c.bp(_,n.u_brightness_high),u_saturation_factor:new c.bp(_,n.u_saturation_factor),u_contrast_factor:new c.bp(_,n.u_contrast_factor),u_spin_weights:new c.c2(_,n.u_spin_weights),u_coords_top:new c.c1(_,n.u_coords_top),u_coords_bottom:new c.c1(_,n.u_coords_bottom)}),symbolIcon:(_,n)=>({u_is_size_zoom_constant:new c.b_(_,n.u_is_size_zoom_constant),u_is_size_feature_constant:new c.b_(_,n.u_is_size_feature_constant),u_size_t:new c.bp(_,n.u_size_t),u_size:new c.bp(_,n.u_size),u_camera_to_center_distance:new c.bp(_,n.u_camera_to_center_distance),u_pitch:new c.bp(_,n.u_pitch),u_rotate_symbol:new c.b_(_,n.u_rotate_symbol),u_aspect_ratio:new c.bp(_,n.u_aspect_ratio),u_fade_change:new c.bp(_,n.u_fade_change),u_label_plane_matrix:new c.c0(_,n.u_label_plane_matrix),u_coord_matrix:new c.c0(_,n.u_coord_matrix),u_is_text:new c.b_(_,n.u_is_text),u_pitch_with_map:new c.b_(_,n.u_pitch_with_map),u_is_along_line:new c.b_(_,n.u_is_along_line),u_is_variable_anchor:new c.b_(_,n.u_is_variable_anchor),u_texsize:new c.c3(_,n.u_texsize),u_texture:new c.b_(_,n.u_texture),u_translation:new c.c3(_,n.u_translation),u_pitched_scale:new c.bp(_,n.u_pitched_scale)}),symbolSDF:(_,n)=>({u_is_size_zoom_constant:new c.b_(_,n.u_is_size_zoom_constant),u_is_size_feature_constant:new c.b_(_,n.u_is_size_feature_constant),u_size_t:new c.bp(_,n.u_size_t),u_size:new c.bp(_,n.u_size),u_camera_to_center_distance:new c.bp(_,n.u_camera_to_center_distance),u_pitch:new c.bp(_,n.u_pitch),u_rotate_symbol:new c.b_(_,n.u_rotate_symbol),u_aspect_ratio:new c.bp(_,n.u_aspect_ratio),u_fade_change:new c.bp(_,n.u_fade_change),u_label_plane_matrix:new c.c0(_,n.u_label_plane_matrix
vendor: 23,449 bytes, line 1254
1254),u_coord_matrix:new c.c0(_,n.u_coord_matrix),u_is_text:new c.b_(_,n.u_is_text),u_pitch_with_map:new c.b_(_,n.u_pitch_with_map),u_is_along_line:new c.b_(_,n.u_is_along_line),u_is_variable_anchor:new c.b_(_,n.u_is_variable_anchor),u_texsize:new c.c3(_,n.u_texsize),u_texture:new c.b_(_,n.u_texture),u_gamma_scale:new c.bp(_,n.u_gamma_scale),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_is_halo:new c.b_(_,n.u_is_halo),u_is_plain:new c.b_(_,n.u_is_plain),u_translation:new c.c3(_,n.u_translation),u_pitched_scale:new c.bp(_,n.u_pitched_scale)}),symbolTextAndIcon:(_,n)=>({u_is_size_zoom_constant:new c.b_(_,n.u_is_size_zoom_constant),u_is_size_feature_constant:new c.b_(_,n.u_is_size_feature_constant),u_size_t:new c.bp(_,n.u_size_t),u_size:new c.bp(_,n.u_size),u_camera_to_center_distance:new c.bp(_,n.u_camera_to_center_distance),u_pitch:new c.bp(_,n.u_pitch),u_rotate_symbol:new c.b_(_,n.u_rotate_symbol),u_aspect_ratio:new c.bp(_,n.u_aspect_ratio),u_fade_change:new c.bp(_,n.u_fade_change),u_label_plane_matrix:new c.c0(_,n.u_label_plane_matrix),u_coord_matrix:new c.c0(_,n.u_coord_matrix),u_is_text:new c.b_(_,n.u_is_text),u_pitch_with_map:new c.b_(_,n.u_pitch_with_map),u_is_along_line:new c.b_(_,n.u_is_along_line),u_is_variable_anchor:new c.b_(_,n.u_is_variable_anchor),u_texsize:new c.c3(_,n.u_texsize),u_texsize_icon:new c.c3(_,n.u_texsize_icon),u_texture:new c.b_(_,n.u_texture),u_texture_icon:new c.b_(_,n.u_texture_icon),u_gamma_scale:new c.bp(_,n.u_gamma_scale),u_device_pixel_ratio:new c.bp(_,n.u_device_pixel_ratio),u_is_halo:new c.b_(_,n.u_is_halo),u_translation:new c.c3(_,n.u_translation),u_pitched_scale:new c.bp(_,n.u_pitched_scale)}),background:(_,n)=>({u_opacity:new c.bp(_,n.u_opacity),u_color:new c.b$(_,n.u_color)}),backgroundPattern:(_,n)=>({u_opacity:new c.bp(_,n.u_opacity),u_image:new c.b_(_,n.u_image),u_pattern_tl_a:new c.c3(_,n.u_pattern_tl_a),u_pattern_br_a:new c.c3(_,n.u_pattern_br_a),u_pattern_tl_b:new c.c3(_,n.u_pattern_tl_b),u_pattern_br_b:new c.c3(_,n.u_pattern_br_b),u_texsize:new c.c3(_,n.u_texsize),u_mix:new c.bp(_,n.u_mix),u_pattern_size_a:new c.c3(_,n.u_pattern_size_a),u_pattern_size_b:new c.c3(_,n.u_pattern_size_b),u_scale_a:new c.bp(_,n.u_scale_a),u_scale_b:new c.bp(_,n.u_scale_b),u_pixel_coord_upper:new c.c3(_,n.u_pixel_coord_upper),u_pixel_coord_lower:new c.c3(_,n.u_pixel_coord_lower),u_tile_units_to_pixels:new c.bp(_,n.u_tile_units_to_pixels)}),terrain:(_,n)=>({u_texture:new c.b_(_,n.u_texture),u_ele_delta:new c.bp(_,n.u_ele_delta),u_fog_matrix:new c.c0(_,n.u_fog_matrix),u_fog_color:new c.b$(_,n.u_fog_color),u_fog_ground_blend:new c.bp(_,n.u_fog_ground_blend),u_fog_ground_blend_opacity:new c.bp(_,n.u_fog_ground_blend_opacity),u_horizon_color:new c.b$(_,n.u_horizon_color),u_horizon_fog_blend:new c.bp(_,n.u_horizon_fog_blend),u_is_globe_mode:new c.bp(_,n.u_is_globe_mode)}),terrainDepth:(_,n)=>({u_ele_delta:new c.bp(_,n.u_ele_delta)}),terrainCoords:(_,n)=>({u_texture:new c.b_(_,n.u_texture),u_terrain_coords_id:new c.bp(_,n.u_terrain_coords_id),u_ele_delta:new c.bp(_,n.u_ele_delta)}),projectionErrorMeasurement:(_,n)=>({u_input:new c.bp(_,n.u_input),u_output_expected:new c.bp(_,n.u_output_expected)}),atmosphere:(_,n)=>({u_sun_pos:new c.c2(_,n.u_sun_pos),u_atmosphere_blend:new c.bp(_,n.u_atmosphere_blend),u_globe_position:new c.c2(_,n.u_globe_position),u_globe_radius:new c.bp(_,n.u_globe_radius),u_inv_proj_matrix:new c.c0(_,n.u_inv_proj_matrix)}),sky:(_,n)=>({u_sky_color:new c.b$(_,n.u_sky_color),u_horizon_color:new c.b$(_,n.u_horizon_color),u_horizon:new c.c3(_,n.u_horizon),u_horizon_normal:new c.c3(_,n.u_horizon_normal),u_sky_horizon_blend:new c.bp(_,n.u_sky_horizon_blend),u_sky_blend:new c.bp(_,n.u_sky_blend)})};class q0{constructor(n,a,h){this.context=n;const f=n.gl;this.buffer=f.createBuffer(),this.dynamicDraw=!!h,this.context.unbindVAO(),n.bindElementBuffer.set(this.buffer),f.bufferData(f.ELEMENT_ARRAY_BUFFER,a.arrayBuffer,this.dynamicDraw?f.DYNAMIC_DRAW:f.STATIC_DRAW),this.dynamicDraw||a.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(n){const a=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),a.bufferSubData(a.ELEMENT_ARRAY_BUFFER,0,n.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const W0={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Xg{constructor(n,a,h,f){this.length=a.length,this.attributes=h,this.itemSize=a.bytesPerElement,this.dynamicDraw=f,this.context=n;const b=n.gl;this.buffer=b.createBuffer(),n.bindVertexBuffer.set(this.buffer),b.bufferData(b.ARRAY_BUFFER,a.arrayBuffer,this.dynamicDraw?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.dynamicDraw||a.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(n){if(n.length!==this.length)throw new Error(`Length of new data is ${n.length}, which doesn't match current length of ${this.length}`);const a=this.context.gl;this.bind(),a.bufferSubData(a.ARRAY_BUFFER,0,n.arrayBuffer)}enableAttributes(n,a){for(const h of this.attributes){const f=a.attributes[h.name];f!==void 0&&n.enableVertexAttribArray(f)}}setVertexAttribPointers(n,a,h){for(const f of this.attributes){const b=a.attributes[f.name];b!==void 0&&n.vertexAttribPointer(b,f.components,n[W0[f.type]],!1,this.itemSize,f.offset+this.itemSize*(h||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Xt{constructor(n){this.gl=n.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(n){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Kg extends Xt{getDefault(){return c.bo.transparent}set(n){const a=this.current;(n.r!==a.r||n.g!==a.g||n.b!==a.b||n.a!==a.a||this.dirty)&&(this.gl.clearColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)}}class ad extends Xt{getDefault(){return 1}set(n){(n!==this.current||this.dirty)&&(this.gl.clearDepth(n),this.current=n,this.dirty=!1)}}class ld extends Xt{getDefault(){return 0}set(n){(n!==this.current||this.dirty)&&(this.gl.clearStencil(n),this.current=n,this.dirty=!1)}}class cd extends Xt{getDefault(){return[!0,!0,!0,!0]}set(n){const a=this.current;(n[0]!==a[0]||n[1]!==a[1]||n[2]!==a[2]||n[3]!==a[3]||this.dirty)&&(this.gl.colorMask(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)}}class Kp extends Xt{getDefault(){return!0}set(n){(n!==this.current||this.dirty)&&(this.gl.depthMask(n),this.current=n,this.dirty=!1)}}class ea extends Xt{getDefault(){return 255}set(n){(n!==this.current||this.dirty)&&(this.gl.stencilMask(n),this.current=n,this.dirty=!1)}}class Ic extends Xt{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(n){const a=this.current;(n.func!==a.func||n.ref!==a.ref||n.mask!==a.mask||this.dirty)&&(this.gl.stencilFunc(n.func,n.ref,n.mask),this.current=n,this.dirty=!1)}}class il extends Xt{getDefault(){const n=this.gl;return[n.KEEP,n.KEEP,n.KEEP]}set(n){const a=this.current;(n[0]!==a[0]||n[1]!==a[1]||n[2]!==a[2]||this.dirty)&&(this.gl.stencilOp(n[0],n[1],n[2]),this.current=n,this.dirty=!1)}}class Si extends Xt{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;n?a.enable(a.STENCIL_TEST):a.disable(a.STENCIL_TEST),this.current=n,this.dirty=!1}}class Yg extends Xt{getDefault(){return[0,1]}set(n){const a=this.current;(n[0]!==a[0]||n[1]!==a[1]||this.dirty)&&(this.gl.depthRange(n[0],n[1]),this.current=n,this.dirty=!1)}}class Qg extends Xt{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;n?a.enable(a.DEPTH_TEST):a.disable(a.DEPTH_TEST),this.current=n,this.dirty=!1}}class Yp extends Xt{getDefault(){return this.gl.LESS}set(n){(n!==this.current||this.dirty)&&(this.gl.depthFunc(n),this.current=n,this.dirty=!1)}}class ta extends Xt{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;n?a.enable(a.BLEND):a.disable(a.BLEND),this.current=n,this.dirty=!1}}class ud extends Xt{getDefault(){const n=this.gl;return[n.ONE,n.ZERO]}set(n){const a=this.current;(n[0]!==a[0]||n[1]!==a[1]||this.dirty)&&(this.gl.blendFunc(n[0],n[1]),this.current=n,this.dirty=!1)}}class dd extends Xt{getDefault(){return c.bo.transparent}set(n){const a=this.current;(n.r!==a.r||n.g!==a.g||n.b!==a.b||n.a!==a.a||this.dirty)&&(this.gl.blendColor(n.r,n.g,n.b,n.a),this.current=n,this.dirty=!1)}}class Mc extends Xt{getDefault(){return this.gl.FUNC_ADD}set(n){(n!==this.current||this.dirty)&&(this.gl.blendEquation(n),this.current=n,this.dirty=!1)}}class hd extends Xt{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;n?a.enable(a.CULL_FACE):a.disable(a.CULL_FACE),this.current=n,this.dirty=!1}}class Jg extends Xt{getDefault(){return this.gl.BACK}set(n){(n!==this.current||this.dirty)&&(this.gl.cullFace(n),this.current=n,this.dirty=!1)}}class ol extends Xt{getDefault(){return this.gl.CCW}set(n){(n!==this.current||this.dirty)&&(this.gl.frontFace(n),this.current=n,this.dirty=!1)}}class sl extends Xt{getDefault(){return null}set(n){(n!==this.current||this.dirty)&&(this.gl.useProgram(n),this.current=n,this.dirty=!1)}}class ey extends Xt{getDefault(){return this.gl.TEXTURE0}set(n){(n!==this.current||this.dirty)&&(this.gl.activeTexture(n),this.current=n,this.dirty=!1)}}class Qp extends Xt{getDefault(){const n=this.gl;return[0,0,n.drawingBufferWidth,n.drawingBufferHeight]}set(n){const a=this.current;(n[0]!==a[0]||n[1]!==a[1]||n[2]!==a[2]||n[3]!==a[3]||this.dirty)&&(this.gl.viewport(n[0],n[1],n[2],n[3]),this.current=n,this.dirty=!1)}}class Lt extends Xt{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;a.bindFramebuffer(a.FRAMEBUFFER,n),this.current=n,this.dirty=!1}}class pd extends Xt{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;a.bindRenderbuffer(a.RENDERBUFFER,n),this.current=n,this.dirty=!1}}class Z0 extends Xt{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;a.bindTexture(a.TEXTURE_2D,n),this.current=n,this.dirty=!1}}class ty extends Xt{getDefault(){return null}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;a.bindBuffer(a.ARRAY_BUFFER,n),this.current=n,this.dirty=!1}}class Ac extends Xt{getDefault(){return null}set(n){const a=this.gl;a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,n),this.current=n,this.dirty=!1}}class H0 extends Xt{getDefault(){return null}set(n){var a;if(n===this.current&&!this.dirty)return;const h=this.gl;$i(h)?h.bindVertexArray(n):(a=h.getExtension("OES_vertex_array_object"))===null||a===void 0||a.bindVertexArrayOES(n),this.current=n,this.dirty=!1}}class X0 extends Xt{getDefault(){return 4}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;a.pixelStorei(a.UNPACK_ALIGNMENT,n),this.current=n,this.dirty=!1}}class ry extends Xt{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n),this.current=n,this.dirty=!1}}class K0 extends Xt{getDefault(){return!1}set(n){if(n===this.current&&!this.dirty)return;const a=this.gl;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,n),this.current=n,this.dirty=!1}}class Rc extends Xt{constructor(n,a){super(n),this.context=n,this.parent=a}getDefault(){return null}}class fd extends Rc{setDirty(){this.dirty=!0}set(n){if(n===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const a=this.gl;a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,n,0),this.current=n,this.dirty=!1}}class kc extends Rc{set(n){if(n===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const a=this.gl;a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_ATTACHMENT,a.RENDERBUFFER,n),this.current=n,this.dirty=!1}}class md extends Rc{set(n){if(n===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const a=this.gl;a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,n),this.current=n,this.dirty=!1}}const gd="Framebuffer is not complete";class ny{constructor(n,a,h,f,b){this.context=n,this.width=a,this.height=h;const E=n.gl,C=this.framebuffer=E.createFramebuffer();if(this.colorAttachment=new fd(n,C),f)this.depthAttachment=b?new md(n,C):new kc(n,C);else if(b)throw new Error("Stencil cannot be set without depth");if(E.checkFramebufferStatus(E.FRAMEBUFFER)!==E.FRAMEBUFFER_COMPLETE)throw new Error(gd)}destroy(){const n=this.context.gl,a=this.colorAttachment.get();if(a&&n.deleteTexture(a),this.depthAttachment){const h=this.depthAttachment.get();h&&n.deleteRenderbuffer(h)}n.deleteFramebuffer(this.framebuffer)}}class yd{constructor(n){var a,h;if(this.gl=n,this.clearColor=new Kg(this),this.clearDepth=new ad(this),this.clearStencil=new ld(this),this.colorMask=new cd(this),this.depthMask=new Kp(this),this.stencilMask=new ea(this),this.stencilFunc=new Ic(this),this.stencilOp=new il(this),this.stencilTest=new Si(this),this.depthRange=new Yg(this),this.depthTest=new Qg(this),this.depthFunc=new Yp(this),this.blend=new ta(this),this.blendFunc=new ud(this),this.blendColor=new dd(this),this.blendEquation=new Mc(this),this.cullFace=new hd(this),this.cullFaceSide=new Jg(this),this.frontFace=new ol(this),this.program=new sl(this),this.activeTexture=new ey(this),this.viewport=new Qp(this),this.bindFramebuffer=new Lt(this),this.bindRenderbuffer=new pd(this),this.bindTexture=new Z0(this),this.bindVertexBuffer=new ty(this),this.bindElementBuffer=new Ac(this),this.bindVertexArray=new H0(this),this.pixelStoreUnpack=new X0(this),this.pixelStoreUnpackPremultiplyAlpha=new ry(this),this.pixelStoreUnpackFlipY=new K0(this),this.extTextureFilterAnisotropic=n.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=n.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),$i(n)){this.HALF_FLOAT=n.HALF_FLOAT;const f=n.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(a=n.RGBA16F)!==null&&a!==void 0?a:f==null?void 0:f.RGBA16F_EXT,this.RGB16F=(h=n.RGB16F)!==null&&h!==void 0?h:f==null?void 0:f.RGB16F_EXT,n.getExtension("EXT_color_buffer_float")}else{n.getExtension("EXT_color_buffer_half_float"),n.getExtension("OES_texture_half_float_linear");const f=n.getExtension("OES_texture_half_float");this.HALF_FLOAT=f==null?void 0:f.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(n,a){return new q0(this,n,a)}createVertexBuffer(n,a,h){return new Xg(this,n,a,h)}createRenderbuffer(n,a,h){const f=this.gl,b=f.createRenderbuffer();return this.bindRenderbuffer.set(b),f.renderbufferStorage(f.RENDERBUFFER,n,a,h),this.bindRenderbuffer.set(null),b}createFramebuffer(n,a,h,f){return new ny(this,n,a,h,f)}clear({color:n,depth:a,stencil:h}){const f=this.gl;let b=0;n&&(b|=f.COLOR_BUFFER_BIT,this.clearColor.set(n),this.colorMask.set([!0,!0,!0,!0])),a!==void 0&&(b|=f.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(a),this.depthMask.set(!0)),h!==void 0&&(b|=f.STENCIL_BUFFER_BIT,this.clearStencil.set(h),this.stencilMask.set(255)),f.clear(b)}setCullFace(n){n.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(n.mode),this.frontFace.set(n.frontFace))}setDepthMode(n){n.func!==this.gl.ALWAYS||n.mask?(this.depthTest.set(!0),this.depthFunc.set(n.func),this.depthMask.set(n.mask),this.depthRange.set(n.range)):this.depthTest.set(!1)}setStencilMode(n){n.test.func!==this.gl.ALWAYS||n.mask?(this.stencilTest.set(!0),this.stencilMask.set(n.mask),this.stencilOp.set([n.fail,n.depthFail,n.pass]),this.stencilFunc.set({func:n.test.func,ref:n.ref,mask:n.test.mask})):this.stencilTest.set(!1)}setColorMode(n){c.bQ(n.blendFunction,ir.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(n.blendFunction),this.blendColor.set(n.blendColor)),this.colorMask.set(n.mask)}createVertexArray(){var n;return $i(this.gl)?this.gl.createVertexArray():(n=this.gl.getExtension("OES_vertex_array_object"))===null||n===void 0?void 0:n.createVertexArrayOES()}deleteVertexArray(n){var a;$i(this.gl)?this.gl.deleteVertexArray(n):(a=this.gl.getExtension("OES_vertex_array_object"))===null||a===void 0||a.deleteVertexArrayOES(n)}unbindVAO(){this.bindVertexArray.set(null)}}let ra;function al(_,n,a,h,f){var b,E;const C=_.context,k=_.transform,O=C.gl,F=_.useProgram("collisionBox"),U=[];let $=0,H=0;for(const we of h){const ye=n.getTile(we).getBucket(a);if(!ye)continue;const fe=f?ye.textCollisionBox:ye.iconCollisionBox,be=ye.collisionCircleArray;be.length>0&&(U.push({circleArray:be,circleOffset:H,coord:we}),$+=be.length/4,H=$),fe&&F.draw(C,O.LINES,At.disabled,Bt.disabled,_.colorModeForRenderPass(),Nt.disabled,Gg(_.transform),(b=_.style.map.terrain)===null||b===void 0?void 0:b.getTerrainData(we),k.getProjectionData({overscaledTileID:we,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),a.id,fe.layoutVertexBuffer,fe.indexBuffer,fe.segments,null,_.transform.zoom,null,null,fe.collisionVertexBuffer)}if(!f||!U.length)return;const oe=_.useProgram("collisionCircle"),de=new c.ca;de.resize(4*$),de._trim();let me=0;for(const we of U)for(let ye=0;ye<we.circleArray.length/4;ye++){const fe=4*ye,be=we.circleArray[fe+0],_e=we.circleArray[fe+1],Ie=we.circleArray[fe+2],je=we.circleArray[fe+3];de.emplace(me++,be,_e,Ie,je,0),de.emplace(me++,be,_e,Ie,je,1),de.emplace(me++,be,_e,Ie,je,2),de.emplace(me++,be,_e,Ie,je,3)}(!ra||ra.length<2*$)&&(ra=function(we){const ye=2*we,fe=new c.cc;fe.resize(ye),fe._trim();for(let be=0;be<ye;be++){const _e=6*be;fe.uint16[_e+0]=4*be+0,fe.uint16[_e+1]=4*be+1,fe.uint16[_e+2]=4*be+2,fe.uint16[_e+3]=4*be+2,fe.uint16[_e+4]=4*be+3,fe.uint16[_e+5]=4*be+0}return fe}($));const pe=C.createIndexBuffer(ra,!0),ge=C.createVertexBuffer(de,c.cb.members,!0);for(const we of U){const ye=Qs(_.transform);oe.draw(C,O.TRIANGLES,At.disabled,Bt.disabled,_.colorModeForRenderPass(),Nt.disabled,ye,(E=_.style.map.terrain)===null||E===void 0?void 0:E.getTerrainData(we.coord),null,a.id,ge,pe,c.aV.simpleSegment(0,2*we.circleOffset,we.circleArray.length,we.circleArray.length/2),null,_.transform.zoom,null,null,null)}ge.destroy(),pe.destroy()}const ll=c.ap(new Float32Array(16));function Jp(_,n,a,h,f,b){const{horizontalAlign:E,verticalAlign:C}=c.aP(_);return new c.P((-(E-.5)*n/f+h[0])*b,(-(C-.5)*a/f+h[1])*b)}function Y0(_,n,a,h,f,b){const E=n.tileAnchorPoint.add(new c.P(n.translation[0],n.translation[1]));if(n.pitchWithMap){let C=h.mult(b);a||(C=C.rotate(-f));const k=E.add(C);return Mt(k.x,k.y,n.pitchedLabelPlaneMatrix,n.getElevation).point}if(a){const C=Jt(n.tileAnchorPoint.x+1,n.tileAnchorPoint.y,n).point.sub(_),k=Math.atan(C.y/C.x)+(C.x<0?Math.PI:0);return _.add(h.rotate(k))}return _.add(h)}function Dc(_,n,a,h,f,b,E,C,k,O,F,U){const $=_.text.placedSymbolArray,H=_.text.dynamicLayoutVertexArray,oe=_.icon.dynamicLayoutVertexArray,de={};H.clear();for(let me=0;me<$.length;me++){const pe=$.get(me),ge=pe.hidden||!pe.crossTileID||_.allowVerticalPlacement&&!pe.placedOrientation?null:h[pe.crossTileID];if(ge){const we=new c.P(pe.anchorX,pe.anchorY),ye={getElevation:U,width:f.width,height:f.height,pitchedLabelPlaneMatrix:b,pitchWithMap:a,transform:f,tileAnchorPoint:we,translation:O,unwrappedTileID:F},fe=a?Wa(we.x,we.y,ye):Jt(we.x,we.y,ye),be=gc(f.cameraToCenterDistance,fe.signedDistanceFromCamera);let _e=c.ay(_.textSizeData,C,pe)*be/c.aJ;a&&(_e*=_.tilePixelRatio/E);const{width:Ie,height:je,anchor:Ne,textOffset:Xe,textBoxScale:He}=ge,pt=Jp(Ne,Ie,je,Xe,He,_e),rt=f.getPitchedTextCorrection(we.x+O[0],we.y+O[1],F),Ge=Y0(fe.point,ye,n,pt,-f.bearingInRadians,rt),lt=_.allowVerticalPlacement&&pe.placedOrientation===c.ax.vertical?Math.PI/2:0;for(let gt=0;gt<pe.numGlyphs;gt++)c.aD(H,Ge,lt);k&&pe.associatedIconIndex>=0&&(de[pe.associatedIconIndex]={shiftedAnchor:Ge,angle:lt})}else Gs(pe.numGlyphs,H)}if(k){oe.clear();const me=_.icon.placedSymbolArray;for(let pe=0;pe<me.length;pe++){const ge=me.get(pe);if(ge.hidden)Gs(ge.numGlyphs,oe);else{const we=de[pe];if(we)for(let ye=0;ye<ge.numGlyphs;ye++)c.aD(oe,we.shiftedAnchor,we.angle);else Gs(ge.numGlyphs,oe)}}_.icon.dynamicLayoutVertexBuffer.updateData(oe)}_.text.dynamicLayoutVertexBuffer.updateData(H)}function Q0(_,n,a){return a.iconsInText&&n?"symbolTextAndIcon":_?"symbolSDF":"symbolIcon"}function ef(_,n,a,h,f,b,E,C,k,O,F,U,$){var H,oe;const de=_.context,me=de.gl,pe=_.transform,ge=C==="map",we=k==="map",ye=C!=="viewport"&&a.layout.get("symbol-placement")!=="point",fe=ge&&!we&&!ye,be=!a.layout.get("symbol-sort-key").isConstant();let _e=!1;const Ie=_.getDepthModeForSublayer(0,At.ReadOnly),je=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ne=[],Xe=pe.getCircleRadiusCorrection();for(const rt of h){const Ge=n.getTile(rt),lt=Ge.getBucket(a);if(!lt)continue;const gt=f?lt.text:lt.icon;if(!(gt!=null&&gt.segments.get().length)||!gt.hasVisibleVertices)continue;const Kt=gt.programConfigurations.get(a.id),Rr=f||lt.sdfIcons,tr=f?lt.textSizeData:lt.iconSizeData,Lr=we||pe.pitch!==0,Br=_.useProgram(Q0(Rr,f,lt),Kt),Sn=c.aw(tr,pe.zoom),Sr=(H=_.style.map.terrain)===null||H===void 0?void 0:H.getTerrainData(rt);let jn,hn,Qr,Tn,ps=[0,0],fs=null;if(f)hn=Ge.glyphAtlasTexture,Qr=me.LINEAR,jn=Ge.glyphAtlasTexture.size,lt.iconsInText&&(ps=Ge.imageAtlasTexture.size,fs=Ge.imageAtlasTexture,Tn=Lr||_.options.rotating||_.options.zooming||tr.kind==="composite"||tr.kind==="camera"?me.LINEAR:me.NEAREST);else{const vr=a.layout.get("icon-size").constantOr(0)!==1||lt.iconsNeedLinear;hn=Ge.imageAtlasTexture,Qr=Rr||_.options.rotating||_.options.zooming||vr||Lr?me.LINEAR:me.NEAREST,jn=Ge.imageAtlasTexture.size}const ms=c.aK(Ge,1,_.transform.zoom),En=oi(ge,_.transform,ms),Fo=qu(we,ge,_.transform,ms),gs=c.aL(pe,Ge,b,E),k
1254d=pe.getProjectionData({overscaledTileID:rt,applyGlobeMatrix:!$,applyTerrainMatrix:!0}),fo=je&&lt.hasTextData(),mo=a.layout.get("icon-text-fit")!=="none"&&fo&&lt.hasIconData();if(ye){const vr=c.O();It(vr,En);const la=_.style.map.terrain?(jo,Tf)=>_.style.map.terrain.getElevation(rt,jo,Tf):null,Dd=a.layout.get("text-rotation-alignment")==="map";Wu(lt,_,f,En,vr,we,O,Dd,rt.toUnwrapped(),pe.width,pe.height,gs,la)}const ui=f&&je||mo,Pi=ye||ui?ll:we?En:_.transform.clipSpaceToPixelsMatrix,_r=Rr&&a.paint.get(f?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let ur;ur=Rr?lt.iconsInText?Hp(tr.kind,Sn,fe,we,ye,ui,_,Pi,Fo,gs,jn,ps,Xe):Zp(tr.kind,Sn,fe,we,ye,ui,_,Pi,Fo,gs,f,jn,_r,Xe):sd(tr.kind,Sn,fe,we,ye,ui,_,Pi,Fo,gs,f,jn,Xe);const Vr={program:Br,buffers:gt,uniformValues:ur,projectionData:kd,atlasTexture:hn,atlasTextureIcon:fs,atlasInterpolation:Qr,atlasInterpolationIcon:Tn,isSDF:Rr,hasHalo:_r};if(be&&lt.canOverlap){_e=!0;const vr=gt.segments.get();for(const la of vr)Ne.push({segments:new c.aV([la]),sortKey:la.sortKey,state:Vr,terrainData:Sr})}else Ne.push({segments:gt.segments,sortKey:0,state:Vr,terrainData:Sr})}_e&&Ne.sort((rt,Ge)=>rt.sortKey-Ge.sortKey);const He=(oe=a.paint.get(f?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&oe!==void 0?oe:1/0,pt=a.layout.get("text-letter-spacing").constantOr(0)*c.aJ<0||He>1;for(const rt of Ne){const Ge=rt.state;de.activeTexture.set(me.TEXTURE0),Ge.atlasTexture.bind(Ge.atlasInterpolation,me.CLAMP_TO_EDGE),Ge.atlasTextureIcon&&(de.activeTexture.set(me.TEXTURE1),Ge.atlasTextureIcon&&Ge.atlasTextureIcon.bind(Ge.atlasInterpolationIcon,me.CLAMP_TO_EDGE));const lt=Ge.isSDF&&Ge.hasHalo;if(lt){const gt=Ge.uniformValues;gt.u_is_halo=1,pt&&(gt.u_is_plain=0,Lc(Ge.buffers,rt.segments,a,_,Ge.program,Ie,F,U,gt,Ge.projectionData,rt.terrainData),gt.u_is_halo=0,gt.u_is_plain=1)}Lc(Ge.buffers,rt.segments,a,_,Ge.program,Ie,F,U,Ge.uniformValues,Ge.projectionData,rt.terrainData),lt&&!pt&&(Ge.uniformValues.u_is_halo=0)}}function Lc(_,n,a,h,f,b,E,C,k,O,F){const U=h.context;f.draw(U,U.gl.TRIANGLES,b,E,C,Nt.backCCW,k,F,O,a.id,_.layoutVertexBuffer,_.indexBuffer,n,a.paint,h.transform.zoom,_.programConfigurations.get(a.id),_.dynamicLayoutVertexBuffer,_.opacityVertexBuffer)}function tf(_,n,a,h,f){const b=_.context,E=b.gl,C=Bt.disabled,k=new ir([E.ONE,E.ONE],c.bo.transparent,[!0,!0,!0,!0]),O=n.getBucket(a);if(!O)return;const F=h.key;let U=a.heatmapFbos.get(F);U||(U=rf(b,n.tileSize,n.tileSize),a.heatmapFbos.set(F,U)),b.bindFramebuffer.set(U.framebuffer),b.viewport.set([0,0,n.tileSize,n.tileSize]),b.clear({color:c.bo.transparent});const $=O.programConfigurations.get(a.id),H=_.useProgram("heatmap",$,!f),oe=_.transform.getProjectionData({overscaledTileID:n.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),de=_.style.map.terrain.getTerrainData(h);H.draw(b,E.TRIANGLES,At.disabled,C,k,Nt.disabled,$p(n,_.transform.zoom,a.paint.get("heatmap-intensity"),1),de,oe,a.id,O.layoutVertexBuffer,O.indexBuffer,O.segments,a.paint,_.transform.zoom,$)}function iy(_,n,a,h,f){const b=_.context,E=b.gl,C=_.transform;b.setColorMode(_.colorModeForRenderPass());const k=zc(b,n),O=a.key,F=n.heatmapFbos.get(O);if(!F)return;b.activeTexture.set(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,F.colorAttachment.get()),b.activeTexture.set(E.TEXTURE1),k.bind(E.LINEAR,E.CLAMP_TO_EDGE);const U=C.getProjectionData({overscaledTileID:a,applyTerrainMatrix:f,applyGlobeMatrix:!h});_.useProgram("heatmapTexture").draw(b,E.TRIANGLES,At.disabled,Bt.disabled,_.colorModeForRenderPass(),Nt.disabled,rl(_,n,0,1),null,U,n.id,_.rasterBoundsBuffer,_.quadTriangleIndexBuffer,_.rasterBoundsSegments,n.paint,C.zoom),F.destroy(),n.heatmapFbos.delete(O)}function rf(_,n,a){var h,f;const b=_.gl,E=b.createTexture();b.bindTexture(b.TEXTURE_2D,E),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);const C=(h=_.HALF_FLOAT)!==null&&h!==void 0?h:b.UNSIGNED_BYTE,k=(f=_.RGBA16F)!==null&&f!==void 0?f:b.RGBA;b.texImage2D(b.TEXTURE_2D,0,k,n,a,0,b.RGBA,C,null);const O=_.createFramebuffer(n,a,!1,!1);return O.colorAttachment.set(E),O}function zc(_,n){return n.colorRampTexture||(n.colorRampTexture=new c.T(_,n.colorRamp,_.gl.RGBA)),n.colorRampTexture}function _d(_,n,a,h,f,b,E,C){let k=256;if(f.stepInterpolant){const O=n.getSource().maxzoom,F=E.canonical.z===O?Math.ceil(1<<_.transform.maxZoom-E.canonical.z):1;k=c.al(c.ce(b.maxLineLength/c.a6*1024*F),256,a.maxTextureSize)}return C.gradient=c.cf({expression:f.gradientExpression(),evaluationKey:"lineProgress",resolution:k,image:C.gradient||void 0,clips:b.lineClipsArray}),C.texture?C.texture.update(C.gradient):C.texture=new c.T(a,C.gradient,h.RGBA),C.version=f.gradientVersion,C.texture}function J0(_,n,a,h,f){_.activeTexture.set(n.TEXTURE0),a.imageAtlasTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE),h.updatePaintBuffers(f)}function oy(_,n,a,h,f,b){(f||_.lineAtlas.dirty)&&(n.activeTexture.set(a.TEXTURE0),_.lineAtlas.bind(n)),h.updatePaintBuffers(b)}function Ar(_,n,a,h,f,b,E){const C=b.gradients[f.id];let k=C.texture;f.gradientVersion!==C.version&&(k=_d(_,n,a,h,f,b,E,C)),a.activeTexture.set(h.TEXTURE0),k.bind(f.stepInterpolant?h.NEAREST:h.LINEAR,h.CLAMP_TO_EDGE)}function na(_,n,a,h,f,b,E,C,k){const O=b.gradients[f.id];let F=O.texture;f.gradientVersion!==O.version&&(F=_d(_,n,a,h,f,b,E,O)),a.activeTexture.set(h.TEXTURE0),F.bind(f.stepInterpolant?h.NEAREST:h.LINEAR,h.CLAMP_TO_EDGE),a.activeTexture.set(h.TEXTURE1),_.lineAtlas.bind(a),C.updatePaintBuffers(k)}function Yn(_,n,a,h,f){if(!a||!(h!=null&&h.imageAtlas))return;const b=h.imageAtlas.patternPositions;let E=b[a.to.toString()],C=b[a.from.toString()];if(!E&&C&&(E=C),!C&&E&&(C=E),!E||!C){const k=f.getPaintProperty(n);E=b[k],C=b[k]}E&&C&&_.setConstantPatternPositions(E,C)}function vd(_,n,a,h,f,b,E,C){var k;const O=_.context.gl,F="fill-pattern",U=a.paint.get(F),$=U==null?void 0:U.constantOr(1),H=a.getCrossfadeParameters();let oe,de,me,pe,ge;
1254const we=_.transform,ye=a.paint.get("fill-translate"),fe=a.paint.get("fill-translate-anchor");E?(de=$&&!a.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",oe=O.LINES):(de=$?"fillPattern":"fill",oe=O.TRIANGLES);const be=U.constantOr(null);for(const _e of h){const Ie=n.getTile(_e);if($&&!Ie.patternsLoaded())continue;const je=Ie.getBucket(a);if(!je)continue;const Ne=je.programConfigurations.get(a.id),Xe=_.useProgram(de,Ne),He=(k=_.style.map.terrain)===null||k===void 0?void 0:k.getTerrainData(_e);$&&(_.context.activeTexture.set(O.TEXTURE0),Ie.imageAtlasTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE),Ne.updatePaintBuffers(H)),Yn(Ne,F,be,Ie,a);const pt=we.getProjectionData({overscaledTileID:_e,applyGlobeMatrix:!C,applyTerrainMatrix:!0}),rt=c.aL(we,Ie,ye,fe);if(E){pe=je.indexBuffer2,ge=je.segments2;const lt=[O.drawingBufferWidth,O.drawingBufferHeight];me=de==="fillOutlinePattern"&&$?Ug(_,H,Ie,lt,rt):Vg(lt,rt)}else pe=je.indexBuffer,ge=je.segments,me=$?id(_,H,Ie,rt):{u_fill_translate:rt};const Ge=_.stencilModeForClipping(_e);Xe.draw(_.context,oe,f,Ge,b,Nt.backCCW,me,He,pt,a.id,je.layoutVertexBuffer,pe,ge,a.paint,_.transform.zoom,Ne)}}function cl(_,n,a,h,f,b,E,C){var k;const O=_.context,F=O.gl,U="fill-extrusion-pattern",$=a.paint.get(U),H=$.constantOr(1),oe=a.getCrossfadeParameters(),de=a.paint.get("fill-extrusion-opacity"),me=$.constantOr(null),pe=_.transform;for(const ge of h){const we=n.getTile(ge),ye=we.getBucket(a);if(!ye)continue;const fe=(k=_.style.map.terrain)===null||k===void 0?void 0:k.getTerrainData(ge),be=ye.programConfigurations.get(a.id),_e=_.useProgram(H?"fillExtrusionPattern":"fillExtrusion",be);H&&(_.context.activeTexture.set(F.TEXTURE0),we.imageAtlasTexture.bind(F.LINEAR,F.CLAMP_TO_EDGE),be.updatePaintBuffers(oe));const Ie=pe.getProjectionData({overscaledTileID:ge,applyGlobeMatrix:!C,applyTerrainMatrix:!0});Yn(be,U,me,we,a);const je=c.aL(pe,we,a.paint.get("fill-extrusion-translate"),a.paint.get("fill-extrusion-translate-anchor")),Ne=a.paint.get("fill-extrusion-vertical-gradient"),Xe=H?Bg(_,Ne,de,je,ge,oe,we):Ng(_,Ne,de,je);_e.draw(O,O.gl.TRIANGLES,f,b,E,Nt.backCCW,Xe,fe,Ie,a.id,ye.layoutVertexBuffer,ye.indexBuffer,ye.segments,a.paint,_.transform.zoom,be,_.style.map.terrain&&ye.centroidVertexBuffer)}}function xd(_,n,a,h,f,b,E,C,k){var O;const F=_.style.projection,U=_.context,$=_.transform,H=U.gl,oe=[`#define NUM_ILLUMINATION_SOURCES ${a.paint.get("hillshade-highlight-color").values.length}`],de=_.useProgram("hillshade",null,!1,oe),me=!_.options.moving;for(const pe of h){const ge=n.getTile(pe),we=ge.fbo;if(!we)continue;const ye=F.getMeshFromTileID(U,pe.canonical,C,!0,"raster"),fe=(O=_.style.map.terrain)===null||O===void 0?void 0:O.getTerrainData(pe);U.activeTexture.set(H.TEXTURE0),H.bindTexture(H.TEXTURE_2D,we.colorAttachment.get());const be=$.getProjectionData({overscaledTileID:pe,aligned:me,applyGlobeMatrix:!k,applyTerrainMatrix:!0});de.draw(U,H.TRIANGLES,b,f[pe.overscaledZ],E,Nt.backCCW,V0(_,ge,a),fe,be,a.id,ye.vertexBuffer,ye.indexBuffer,ye.segments)}}let us=0;function Oc(_,n,a,h,f,b,E,C,k){var O;const F=_.style.projection,U=_.context,$=_.transform,H=U.gl,oe=_.useProgram("colorRelief"),de=!_.options.moving,me=a.paint.get("resampling")==="nearest"?H.NEAREST:H.LINEAR;let pe=!0,ge=0;for(const we of h){const ye=n.getTile(we),fe=ye.dem;if(pe){us||(us=H.getParameter(H.MAX_TEXTURE_SIZE));const Xe=us,{elevationTexture:He,colorTexture:pt}=a.getColorRampTextures(U,Xe,fe.getUnpackVector());U.activeTexture.set(H.TEXTURE1),He.bind(H.NEAREST,H.CLAMP_TO_EDGE),U.activeTexture.set(H.TEXTURE4),pt.bind(H.LINEAR,H.CLAMP_TO_EDGE),pe=!1,ge=He.size[0]}if(!(fe!=null&&fe.data))continue;const be=fe.stride,_e=fe.getPixels();if(U.activeTexture.set(H.TEXTURE0),U.pixelStoreUnpackPremultiplyAlpha.set(!1),ye.demTexture||(ye.demTexture=_.getTileTexture(be)),ye.demTexture){const Xe=ye.demTexture;Xe.update(_e,{premultiply:!1}),Xe.bind(me,H.CLAMP_TO_EDGE)}else ye.demTexture=new c.T(U,_e,H.RGBA,{premultiply:!1}),ye.demTexture.bind(me,H.CLAMP_TO_EDGE);const Ie=F.getMeshFromTileID(U,we.canonical,C,!0,"raster"),je=(O=_.style.map.terrain)===null||O===void 0?void 0:O.getTerrainData(we),Ne=$.getProjectionData({overscaledTileID:we,aligned:de,applyGlobeMatrix:!k,applyTerrainMatrix:!0});oe.draw(U,H.TRIANGLES,b,f[we.overscaledZ],E,Nt.backCCW,$0(a,ye.dem,ge),je,Ne,a.id,Ie.vertexBuffer,Ie.indexBuffer,Ie.segments)}}const ia=[new c.P(0,0),new c.P(c.a6,0),new c.P(c.a6,c.a6),new c.P(0,c.a6)];function ul(_,n,a,h,f,b,E,C,k=!1,O=!1){var F;
1254const U=h[h.length-1].overscaledZ,$=_.context,H=$.gl,oe=_.useProgram("raster"),de=_.transform,me=_.style.projection,pe=_.colorModeForRenderPass(),ge=!_.options.moving,we=a.paint.get("raster-opacity"),ye=a.paint.get("resampling")==="nearest"||a.paint.get("raster-resampling")==="nearest"?H.NEAREST:H.LINEAR,fe=a.paint.get("raster-fade-duration"),be=!!_.style.map.terrain;for(const _e of h){const Ie=_.getDepthModeForSublayer(_e.overscaledZ-U,we===1?At.ReadWrite:At.ReadOnly,H.LESS),je=n.getTile(_e);$.activeTexture.set(H.TEXTURE0),je.texture.bind(ye,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST),$.activeTexture.set(H.TEXTURE1);const{parentTile:Ne,parentScaleBy:Xe,parentTopLeft:He,fadeValues:pt}=sy(je,n,fe,be);je.fadeOpacity=pt.tileOpacity,Ne?(Ne.fadeOpacity=pt.parentTileOpacity,Ne.texture.bind(ye,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST)):je.texture.bind(ye,H.CLAMP_TO_EDGE,H.LINEAR_MIPMAP_NEAREST),je.texture.useMipmap&&$.extTextureFilterAnisotropic&&_.transform.pitch>_.options.anisotropicFilterPitch&&H.texParameterf(H.TEXTURE_2D,$.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,$.extTextureFilterAnisotropicMax);const rt=(F=_.style.map.terrain)===null||F===void 0?void 0:F.getTerrainData(_e),Ge=de.getProjectionData({overscaledTileID:_e,aligned:ge,applyGlobeMatrix:!O,applyTerrainMatrix:!0}),lt=qp(He,Xe,pt.fadeMix,a,C),gt=me.getMeshFromTileID($,_e.canonical,b,E,"raster");oe.draw($,H.TRIANGLES,Ie,f?f[_e.overscaledZ]:Bt.disabled,pe,k?Nt.frontCCW:Nt.backCCW,lt,rt,Ge,a.id,gt.vertexBuffer,gt.indexBuffer,gt.segments)}}function sy(_,n,a,h){const f={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(a===0||h)return f;if(_.fadingParentID){const b=n.getLoadedTile(_.fadingParentID);if(!b)return f;const E=Math.pow(2,b.tileID.overscaledZ-_.tileID.overscaledZ),C=[_.tileID.canonical.x*E%1,_.tileID.canonical.y*E%1],k=function(O,F,U){const $=Y(),H=($-F.timeAdded)/U,oe=O.fadingDirection===wi.Incoming,de=c.al(($-O.timeAdded)/U,0,1),me=c.al(1-H,0,1),pe=oe?de:me;return{tileOpacity:pe,parentTileOpacity:oe?me:de,fadeMix:{opacity:1,mix:1-pe}}}(_,b,a);return{parentTile:b,parentScaleBy:E,parentTopLeft:C,fadeValues:k}}if(_.selfFading){const b=function(E,C){const k=(Y()-E.timeAdded)/C,O=c.al(k,0,1);return{tileOpacity:O,fadeMix:{opacity:O,mix:0}}}(_,a);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:b}}return f}const ay=new c.bo(1,0,0,1),ly=new c.bo(0,1,0,1),cy=new c.bo(0,0,1,1),uy=new c.bo(1,0,1,1),ds=new c.bo(0,1,1,1);function nf(_,n,a,h){Fc(_,0,n+a/2,_.transform.width,a,h)}function of(_,n,a,h){Fc(_,n-a/2,0,a,_.transform.height,h)}function Fc(_,n,a,h,f,b){const E=_.context,C=E.gl;C.enable(C.SCISSOR_TEST),C.scissor(n*_.pixelRatio,a*_.pixelRatio,h*_.pixelRatio,f*_.pixelRatio),E.clear({color:b}),C.disable(C.SCISSOR_TEST)}function dy(_,n,a){var h;const f=_.context,b=f.gl,E=_.useProgram("debug"),C=At.disabled,k=Bt.disabled,O=_.colorModeForRenderPass(),F="$debug",U=(h=_.style.map.terrain)===null||h===void 0?void 0:h.getTerrainData(a);f.activeTexture.set(b.TEXTURE0);const $=n.getTileByID(a.key).latestRawTileData,H=Math.floor((($==null?void 0:$.byteLength)||0)/1024),oe=n.getTile(a).tileSize,de=512/Math.min(oe,512)*(a.overscaledZ/_.transform.zoom)*.5;let me=a.canonical.toString();a.overscaledZ!==a.canonical.z&&(me+=` => ${a.overscaledZ}`),function(ge,we){ge.initDebugOverlayCanvas();const ye=ge.debugOverlayCanvas,fe=ge.context.gl,be=ge.debugOverlayCanvas.getContext("2d");be.clearRect(0,0,ye.width,ye.height),be.shadowColor="white",be.shadowBlur=2,be.lineWidth=1.5,be.strokeStyle="white",be.textBaseline="top",be.font="bold 36px Open Sans, sans-serif",be.fillText(we,5,5),be.strokeText(we,5,5),ge.debugOverlayTexture.update(ye),ge.debugOverlayTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE)}(_,`${me} ${H}kB`);const pe=_.transform.getProjectionData({overscaledTileID:a,applyGlobeMatrix:!0,applyTerrainMatrix:!0});E.draw(f,b.TRIANGLES,C,k,ir.alphaBlended,Nt.disabled,Up(c.bo.transparent,de),null,pe,F,_.debugBuffer,_.quadTriangleIndexBuffer,_.debugSegments),E.draw(f,b.LINE_STRIP,C,k,O,Nt.disabled,Up(c.bo.red),U,pe,F,_.debugBuffer,_.tileBorderIndexBuffer,_.debugSegments)}function sf(_,n,a,h){const{isRenderingGlobe:f}
1254=h,b=_.context,E=b.gl,C=_.transform,k=_.colorModeForRenderPass(),O=_.getDepthModeFor3D(),F=_.useProgram("terrain");b.bindFramebuffer.set(null),b.viewport.set([0,0,_.width,_.height]);for(const U of a){const $=n.getTerrainMesh(U.tileID),H=_.renderToTexture.getTexture(U),oe=n.getTerrainData(U.tileID);b.activeTexture.set(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,H.texture);const de=n.getMeshFrameDelta(C.zoom),me=C.calculateFogMatrix(U.tileID.toUnwrapped()),pe=nd(de,me,_.style.sky,C.pitch,f),ge=C.getProjectionData({overscaledTileID:U.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});F.draw(b,E.TRIANGLES,O,Bt.disabled,k,Nt.backCCW,pe,oe,ge,"terrain",$.vertexBuffer,$.indexBuffer,$.segments)}}function af(_,n){if(!n.mesh){const a=new c.aU;a.emplaceBack(-1,-1),a.emplaceBack(1,-1),a.emplaceBack(1,1),a.emplaceBack(-1,1);const h=new c.aW;h.emplaceBack(0,1,2),h.emplaceBack(0,2,3),n.mesh=new nr(_.createVertexBuffer(a,ls.members),_.createIndexBuffer(h),c.aV.simpleSegment(0,0,a.length,h.length))}return n.mesh}const hy={symbol:function(_,n,a,h,f,b){if(_.renderPass!=="translucent")return;const{isRenderingToTexture:E}=b,C=Bt.disabled,k=_.colorModeForRenderPass();(a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(O,F,U,$,H,oe,de,me,pe){var ge;const we=F.transform,ye=F.style.map.terrain,fe=H==="map",be=oe==="map";for(const _e of O){const Ie=$.getTile(_e),je=Ie.getBucket(U);if(!(!((ge=je==null?void 0:je.text)===null||ge===void 0)&&ge.segments.get().length))continue;const Ne=c.aw(je.textSizeData,we.zoom),Xe=c.aK(Ie,1,F.transform.zoom),He=oi(fe,F.transform,Xe),pt=U.layout.get("icon-text-fit")!=="none"&&je.hasIconData();if(Ne){const rt=Math.pow(2,we.zoom-Ie.tileID.overscaledZ),Ge=ye?(lt,gt)=>ye.getElevation(_e,lt,gt):null;Dc(je,fe,be,pe,we,He,rt,Ne,pt,c.aL(we,Ie,de,me),_e.toUnwrapped(),Ge)}}}(h,_,a,n,a.layout.get("text-rotation-alignment"),a.layout.get("text-pitch-alignment"),a.paint.get("text-translate"),a.paint.get("text-translate-anchor"),f),a.paint.get("icon-opacity").constantOr(1)!==0&&ef(_,n,a,h,!1,a.paint.get("icon-translate"),a.paint.get("icon-translate-anchor"),a.layout.get("icon-rotation-alignment"),a.layout.get("icon-pitch-alignment"),a.layout.get("icon-keep-upright"),C,k,E),a.paint.get("text-opacity").constantOr(1)!==0&&ef(_,n,a,h,!0,a.paint.get("text-translate"),a.paint.get("text-translate-anchor"),a.layout.get("text-rotation-alignment"),a.layout.get("text-pitch-alignment"),a.layout.get("text-keep-upright"),C,k,E),n.map.showCollisionBoxes&&(al(_,n,a,h,!0),al(_,n,a,h,!1))},circle:function(_,n,a,h,f){var b;if(_.renderPass!=="translucent")return;const{isRenderingToTexture:E}=f,C=a.paint.get("circle-opacity"),k=a.paint.get("circle-stroke-width"),O=a.paint.get("circle-stroke-opacity"),F=!a.layout.get("circle-sort-key").isConstant();if(C.constantOr(1)===0&&(k.constantOr(1)===0||O.constantOr(1)===0))return;const U=_.context,$=U.gl,H=_.transform,oe=_.getDepthModeForSublayer(0,At.ReadOnly),de=Bt.disabled,me=_.colorModeForRenderPass(),pe=[],ge=H.getCircleRadiusCorrection();for(const we of h){const ye=n.getTile(we),fe=ye.getBucket(a);if(!fe)continue;const be=a.paint.get("circle-translate"),_e=a.paint.get("circle-translate-anchor"),Ie=c.aL(H,ye,be,_e),je=fe.programConfigurations.get(a.id),Ne=_.useProgram("circle",je),Xe=fe.layoutVertexBuffer,He=fe.indexBuffer,pt=(b=_.style.map.terrain)===null||b===void 0?void 0:b.getTerrainData(we),rt={programConfiguration:je,program:Ne,layoutVertexBuffer:Xe,indexBuffer:He,uniformValues:$g(_,ye,a,Ie,ge),terrainData:pt,projectionData:H.getProjectionData({overscaledTileID:we,applyGlobeMatrix:!E,applyTerrainMatrix:!0})};if(F){const Ge=fe.segments.get();for(const lt of Ge)pe.push({segments:new c.aV([lt]),sortKey:lt.sortKey,state:rt})}else pe.push({segments:fe.segments,sortKey:0,state:rt})}F&&pe.sort((we,ye)=>we.sortKey-ye.sortKey);for(const we of pe){const{programConfiguration:ye,program:fe,layoutVertexBuffer:be,indexBuffer:_e,uniformValues:Ie,terrainData:je,projectionData:Ne}=we.state;fe.draw(U,$.TRIANGLES,oe,de,me,Nt.backCCW,Ie,je,Ne,a.id,be,_e,we.segments,a.paint,_.transform.zoom,ye)}},heatmap:function(_,n,a,h,f){if(a.paint.get("heatmap-opacity")===0)return;const b=_.context,{isRenderingToTexture:E,isRenderingGlobe:C}=f;if(_.style.map.terrain){for(const k of h){const O=n.getTile(k);n.hasRenderableParent(k)||(_.renderPass==="offscreen"?tf(_,O,a,k,C):_.renderPass==="translucent"&&iy(_,a,k,E,C))}b.viewport.set([0,0,_.width,_.height])}else _.renderPass==="offscreen"?function(k,O,F,U){const $=k.context,H=$.gl,oe
1254=k.transform,de=Bt.disabled,me=new ir([H.ONE,H.ONE],c.bo.transparent,[!0,!0,!0,!0]);(function(pe,ge,we){const ye=pe.gl;pe.activeTexture.set(ye.TEXTURE1),pe.viewport.set([0,0,ge.width/4,ge.height/4]);let fe=we.heatmapFbos.get(c.cd);fe?(ye.bindTexture(ye.TEXTURE_2D,fe.colorAttachment.get()),pe.bindFramebuffer.set(fe.framebuffer)):(fe=rf(pe,ge.width/4,ge.height/4),we.heatmapFbos.set(c.cd,fe))})($,k,F),$.clear({color:c.bo.transparent});for(const pe of U){if(O.hasRenderableParent(pe))continue;const ge=O.getTile(pe),we=ge.getBucket(F);if(!we)continue;const ye=we.programConfigurations.get(F.id),fe=k.useProgram("heatmap",ye),be=oe.getProjectionData({overscaledTileID:pe,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),_e=oe.getCircleRadiusCorrection();fe.draw($,H.TRIANGLES,At.disabled,de,me,Nt.backCCW,$p(ge,oe.zoom,F.paint.get("heatmap-intensity"),_e),null,be,F.id,we.layoutVertexBuffer,we.indexBuffer,we.segments,F.paint,oe.zoom,ye)}$.viewport.set([0,0,k.width,k.height])}(_,n,a,h):_.renderPass==="translucent"&&function(k,O){const F=k.context,U=F.gl;F.setColorMode(k.colorModeForRenderPass());const $=O.heatmapFbos.get(c.cd);$&&(F.activeTexture.set(U.TEXTURE0),U.bindTexture(U.TEXTURE_2D,$.colorAttachment.get()),F.activeTexture.set(U.TEXTURE1),zc(F,O).bind(U.LINEAR,U.CLAMP_TO_EDGE),k.useProgram("heatmapTexture").draw(F,U.TRIANGLES,At.disabled,Bt.disabled,k.colorModeForRenderPass(),Nt.disabled,rl(k,O,0,1),null,null,O.id,k.viewportBuffer,k.quadTriangleIndexBuffer,k.viewportSegments,O.paint,k.transform.zoom))}(_,a)},line:function(_,n,a,h,f){var b;if(_.renderPass!=="translucent")return;const{isRenderingToTexture:E}=f,C=a.paint.get("line-opacity"),k=a.paint.get("line-width");if(C.constantOr(1)===0||k.constantOr(1)===0)return;const O=_.getDepthModeForSublayer(0,At.ReadOnly),F=_.colorModeForRenderPass(),U=a.paint.get("line-dasharray"),$=U.constantOr(1),H=a.paint.get("line-pattern"),oe=H.c
1254onstantOr(1),de=a.paint.get("line-gradient"),me=a.getCrossfadeParameters();let pe;pe=oe?"linePattern":$&&de?"lineGradientSDF":$?"lineSDF":de?"lineGradient":"line";const ge=_.context,we=ge.gl,ye=_.transform;let fe=!0;for(const be of h){const _e=n.getTile(be);if(oe&&!_e.patternsLoaded())continue;const Ie=_e.getBucket(a);if(!Ie)continue;const je=Ie.programConfigurations.get(a.id),Ne=_.context.program.get(),Xe=_.useProgram(pe,je),He=fe||Xe.program!==Ne,pt=(b=_.style.map.terrain)===null||b===void 0?void 0:b.getTerrainData(be),rt=H.constantOr(null),Ge=U==null?void 0:U.constantOr(null);if(rt&&_e.imageAtlas){const tr=_e.imageAtlas,Lr=tr.patternPositions[rt.to.toString()],Br=tr.patternPositions[rt.from.toString()];Lr&&Br&&je.setConstantPatternPositions(Lr,Br)}else if(Ge){const tr=a.layout.get("line-cap").constantOr(null)==="round",Lr=_.lineAtlas.getDash(Ge.to,tr),Br=_.lineAtlas.getDash(Ge.from,tr);je.setConstantDashPositions(Lr,Br)}const lt=ye.getProjectionData({overscaledTileID:be,applyGlobeMatrix:!E,applyTerrainMatrix:!0}),gt=ye.getPixelScale();let Kt;oe?(Kt=Wg(_,_e,a,gt,me),J0(ge,we,_e,je,me)):$&&de?(Kt=Zg(_,_e,a,gt,me,Ie.lineClipsArray.length),na(_,n,ge,we,a,Ie,be,je,me)):$?(Kt=Gp(_,_e,a,gt,me),oy(_,ge,we,je,He,me)):de?(Kt=qg(_,_e,a,gt,Ie.lineClipsArray.length),Ar(_,n,ge,we,a,Ie,be)):Kt=Cc(_,_e,a,gt);const Rr=_.stencilModeForClipping(be);Xe.draw(ge,we.TRIANGLES,O,Rr,F,Nt.disabled,Kt,pt,lt,a.id,Ie.layoutVertexBuffer,Ie.indexBuffer,Ie.segments,a.paint,_.transform.zoom,je,Ie.layoutVertexBuffer2),fe=!1}},fill:function(_,n,a,h,f){const b=a.paint.get("fill-color"),E=a.paint.get("fill-opacity");if(E.constantOr(1)===0)return;const{isRenderingToTexture:C}=f,k=_.colorModeForRenderPass(),O=a.paint.get("fill-pattern"),F=_.opaquePassEnabledForLayer()&&!O.constantOr(1)&&b.constantOr(c.bo.transparent).a===1&&E.constantOr(0)===1?"opaque":"translucent";if(_.renderPass===F){const U=_.getDepthModeForSublayer(1,_.renderPass==="opaque"?At.ReadWrite:At.ReadOnly);vd(_,n,a,h,U,k,!1,C)}if(_.renderPass==="translucent"&&a.paint.get("fill-antialias")){const U=_.getDepthModeForSublayer(a.getPaintProperty("fill-outline-color")?2:0,At.ReadOnly);vd(_,n,a,h,U,k,!0,C)}},fillExtrusion:function(_,n,a,h,f){const b=a.paint.get("fill-extrusion-opacity");if(b===0)return;const{isRenderingToTexture:E}=f;if(_.renderPass==="translucent"){const C=new At(_.context.gl.LEQUAL,At.ReadWrite,_.depthRangeFor3D);if(b!==1||a.paint.get("fill-extrusion-pattern").constantOr(1))cl(_,n,a,h,C,Bt.disabled,ir.disabled,E),cl(_,n,a,h,C,_.stencilModeFor3D(),_.colorModeForRenderPass(),E);
vendor: 12,892 bytes, lines 1254-1256
1254else{const k=_.colorModeForRenderPass();cl(_,n,a,h,C,Bt.disabled,k,E)}}},hillshade:function(_,n,a,h,f){if(_.renderPass!=="offscreen"&&_.renderPass!=="translucent")return;const{isRenderingToTexture:b}=f,E=_.context,C=_.style.projection.useSubdivision,k=_.getDepthModeForSublayer(0,At.ReadOnly),O=_.colorModeForRenderPass();if(_.renderPass==="offscreen")(function(F,U,$,H,oe,de,me){const pe=F.context,ge=pe.gl,we=H.paint.get("resampling")==="nearest"?ge.NEAREST:ge.LINEAR;for(const ye of $){const fe=U.getTile(ye),be=fe.dem;if(!(be!=null&&be.data)||!fe.needsHillshadePrepare)continue;const _e=be.dim,Ie=be.stride,je=be.getPixels();if(pe.activeTexture.set(ge.TEXTURE1),pe.pixelStoreUnpackPremultiplyAlpha.set(!1),fe.demTexture||(fe.demTexture=F.getTileTexture(Ie)),fe.demTexture){const Xe=fe.demTexture;Xe.update(je,{premultiply:!1}),Xe.bind(ge.NEAREST,ge.CLAMP_TO_EDGE)}else fe.demTexture=new c.T(pe,je,ge.RGBA,{premultiply:!1}),fe.demTexture.bind(ge.NEAREST,ge.CLAMP_TO_EDGE);pe.activeTexture.set(ge.TEXTURE0);let Ne=fe.fbo;if(!Ne){const Xe=new c.T(pe,{width:_e,height:_e,data:null},ge.RGBA);Xe.bind(we,ge.CLAMP_TO_EDGE),Ne=fe.fbo=pe.createFramebuffer(_e,_e,!0,!1),Ne.colorAttachment.set(Xe.texture)}pe.bindFramebuffer.set(Ne.framebuffer),pe.viewport.set([0,0,_e,_e]),F.useProgram("hillshadePrepare").draw(pe,ge.TRIANGLES,oe,de,me,Nt.disabled,od(fe.tileID,be),null,null,H.id,F.rasterBoundsBuffer,F.quadTriangleIndexBuffer,F.rasterBoundsSegments),fe.needsHillshadePrepare=!1}})(_,n,h,a,k,Bt.disabled,O),E.viewport.set([0,0,_.width,_.height]);else if(_.renderPass==="translucent")if(C){const[F,U,$]=_.stencilConfigForOverlapTwoPass(h);xd(_,n,a,$,F,k,O,!1,b),xd(_,n,a,$,U,k,O,!0,b)}else{const[F,U]=_.getStencilConfigForOverlapAndUpdateStencilID(h);xd(_,n,a,U,F,k,O,!1,b)}},colorRelief:function(_,n,a,h,f){if(_.renderPass!=="translucent"||!h.length)return;const{isRenderingToTexture:b}=f,E=_.style.projection.useSubdivision,C=_.getDepthModeForSublayer(0,At.ReadOnly),k=_.colorModeForRenderPass();if(E){const[O,F,U]=_.stencilConfigForOverlapTwoPass(h);Oc(_,n,a,U,O,C,k,!1,b),Oc(_,n,a,U,F,C,k,!0,b)}else{const[O,F]=_.getStencilConfigForOverlapAndUpdateStencilID(h);Oc(_,n,a,F,O,C,k,!1,b)}},raster:function(_,n,a,h,f){if(_.renderPass!=="translucent"||a.paint.get("raster-opacity")===0||!h.length)return;const{isRenderingToTexture:b}=f,E=n.getSource(),C=_.style.projection.useSubdivision;if(E instanceof is)ul(_,n,a,h,null,!1,!1,E.tileCoords,E.flippedWindingOrder,b);else if(C){const[k,O,F]=_.stencilConfigForOverlapTwoPass(h);ul(_,n,a,F,k,!1,!0,ia,!1,b),ul(_,n,a,F,O,!0,!0,ia,!1,b)}else{const[k,O]=_.getStencilConfigForOverlapAndUpdateStencilID(h);ul(_,n,a,O,k,!1,!0,ia,!1,b)}},background:function(_,n,a,h,f){var b;const E=a.paint.get("background-color"),C=a.paint.get("background-opacity");if(C===0)return;const{isRenderingToTexture:k}=f,O=_.context,F=O.gl,U=_.style.projection,$=_.transform,H=$.tileSize,oe=a.paint.get("background-pattern");if(_.isPatternMissing(oe))return;const de=!oe&&E.a===1&&C===1&&_.opaquePassEnabledForLayer()?"opaque":"translucent";if(_.renderPass!==de)return;const me=Bt.disabled,pe=_.getDepthModeForSublayer(0,de==="opaque"?At.ReadWrite:At.ReadOnly),ge=_.colorModeForRenderPass(),we=_.useProgram(oe?"backgroundPattern":"background"),ye=h||Vs($,{tileSize:H,terrain:_.style.map.terrain});oe&&(O.activeTexture.set(F.TEXTURE0),_.imageManager.bind(_.context));const fe=a.getCrossfadeParameters();for(const be of ye){const _e=$.getProjectionData({overscaledTileID:be,applyGlobeMatrix:!k,applyTerrainMatrix:!0}),Ie=oe?Xp(C,_,oe,{tileID:be,tileSize:H},fe):Js(C,E),je=(b=_.style.map.terrain)===null||b===void 0?void 0:b.getTerrainData(be),Ne=U.getMeshFromTileID(O,be.canonical,!1,!0,"raster");we.draw(O,F.TRIANGLES,pe,me,ge,Nt.backCCW,Ie,je,_e,a.id,Ne.vertexBuffer,Ne.indexBuffer,Ne.segments)}},sky:function(_,n){const a=_.context,h=a.gl,f=((F,U,$)=>{const H=Math.cos(U.rollInRadians),oe=Math.sin(U.rollInRadians),de=Bs(U),me=U.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:F.properties.get("sky-color"),u_horizon_color:F.properties.get("horizon-color"),u_horizon:[(U.width/2-de*oe)*$,(U.height/2+de*H)*$],u_horizon_normal:[-oe,H],u_sky_horizon_blend:F.properties.get("sky-horizon-blend")*U.height/2*$,u_sky_blend:me}})(n,_.style.map.transform,_.pixelRatio),b=new At(h.LEQUAL,At.ReadWrite,[0,1]),E=Bt.disabled,C=_.colorModeForRenderPass(),k=_.useProgram("sky"),O=af(a,n);k.draw(a,h.TRIANGLES,b,E,C,Nt.disabled,f,null,void 0,"sky",O.vertexBuffer,O.indexBuffer,O.segments)},atmosphere:function(_,n,a){const h=_.context,f=h.gl,b=_.useProgram("atmosphere"),E=new At(f.LEQUAL,At.ReadOnly,[0,1]),C=_.transform,k=function(me,pe){const ge=me.properties.get("position"),we=[-ge.x,-ge.y,-ge.z],ye=c.ap(new Float64Array(16));return me.properties.get("anchor")==="map"&&(c.be(ye,ye,pe.rollInRadians),c.bf(ye,ye,-pe.pitchInRadians),c.be(ye,ye,pe.bearingInRadians),c.bf(ye,ye,pe.center.lat*Math.PI/180),c.bI(ye,ye,-pe.center.lng*Math.PI/180)),c.cg(we,we,ye),we}(a,_.transform),O=C.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),F=n.properties.get("atmosphere-blend")*O.projectionTransition;if(F===0)return;const U=ai(C.worldSize,C.center.lat),$=C.inverseProjectionMatrix,H=new Float64Array(4);H[3]=1,c.aE(H,H,C.modelViewProjectionMatrix),H[0]/=H[3],H[1]/=H[3],H[2]/=H[3],H[3]=1,c.aE(H,H,$),H[0]/=H[3],H[1]/=H[3],H[2]/=H[3],H[3]=1;const oe=((me,pe,ge,we,ye)=>({u_sun_pos:me,u_atmosphere_blend:pe,u_globe_position:ge,u_globe_radius:we,u_inv_proj_matrix:ye}))(k,F,[H[0],H[1],H[2]],U,$),de=af(h,n);b.draw(h,f.TRIANGLES,E,Bt.disabled,ir.alphaBlended,Nt.disabled,oe,null,null,"atmosphere",de.vertexBuffer,de.indexBuffer,de.segments)},custom:function(_,n,a,h){const{isRenderingGlobe:f}=h,b=_.context,E=a.implementation,C=_.style.projection,k=_.transform,O=k.getProjectionDataForCustomLayer(f),F={farZ:k.farZ,nearZ:k.nearZ,fov:k.fov*Math.PI/180,modelViewProjectionMatrix:k.modelViewProjectionMatrix,projectionMatrix:k.projectionMatrix,shaderData:{variantName:C.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
1255uniform mat4 u_projection_matrix;
1256${C.shaderPreludeCode.vertexSource}`,define:C.shaderDefine},defaultProjectionData:O},U=E.renderingMode?E.renderingMode:"2d";if(_.renderPass==="offscreen"){const $=E.prerender;$&&(_.setCustomLayerDefaults(),b.setColorMode(_.colorModeForRenderPass()),$.call(E,b.gl,F),b.setDirty(),_.setBaseState())}else if(_.renderPass==="translucent"){_.setCustomLayerDefaults(),b.setColorMode(_.colorModeForRenderPass()),b.setStencilMode(Bt.disabled);const $=U==="3d"?_.getDepthModeFor3D():_.getDepthModeForSublayer(0,At.ReadOnly);b.setDepthMode($),E.render(b.gl,F),b.setDirty(),_.setBaseState(),b.bindFramebuffer.set(null)}},debug:function(_,n,a){for(const h of a)dy(_,n,h)},debugPadding:function(_){const n=_.transform.padding;nf(_,_.transform.height-(n.top||0),3,ay),nf(_,n.bottom||0,3,ly),of(_,n.left||0,3,cy),of(_,_.transform.width-(n.right||0),3,uy);const a=_.transform.centerPoint;(function(h,f,b,E){Fc(h,f-1,b-10,2,20,E),Fc(h,f-10,b-1,20,2,E)})(_,a.x,_.transform.height-a.y,ds)},terrainDepth:function(_,n){const a=_.context,h=a.gl,f=_.transform,b=ir.unblended,E=new At(h.LEQUAL,At.ReadWrite,[0,1]),C=n.tileManager.getRenderableTiles(),k=_.useProgram("terrainDepth");a.bindFramebuffer.set(n.getFramebuffer("depth").framebuffer),a.viewport.set([0,0,_.width/devicePixelRatio,_.height/devicePixelRatio]),a.clear({color:c.bo.transparent,depth:1});for(const O of C){const F=n.getTerrainMesh(O.tileID),U=n.getTerrainData(O.tileID),$=f.getProjectionData({overscaledTileID:O.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),H={u_ele_delta:n.getMeshFrameDelta(f.zoom)};k.draw(a,h.TRIANGLES,E,Bt.disabled,b,Nt.backCCW,H,U,$,"terrain",F.vertexBuffer,F.indexBuffer,F.segments)}a.bindFramebuffer.set(null),a.viewport.set([0,0,_.width,_.height])},terrainCoords:function(_,n){const a=_.context,h=a.gl,f=_.transform,b=ir.unblended,E=new At(h.LEQUAL,At.ReadWrite,[0,1]),C=n.getCoordsTexture(),k=n.tileManager.getRenderableTiles(),O=_.useProgram("terrainCoords");a.bindFramebuffer.set(n.getFramebuffer("coords").framebuffer),a.viewport.set([0,0,_.width/devicePixelRatio,_.height/devicePixelRatio]),a.clear({color:c.bo.transparent,depth:1}),n.coordsIndex=[];for(const F of k){const U=n.getTerrainMesh(F.tileID),$=n.getTerrainData(F.tileID);a.activeTexture.set(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,C.texture);const H={u_terrain_coords_id:(255-n.coordsIndex.length)/255,u_texture:0,u_ele_delta:n.getMeshFrameDelta(f.zoom)},oe=f.getProjectionData({overscaledTileID:F.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});O.draw(a,h.TRIANGLES,E,Bt.disabled,b,Nt.backCCW,H,$,oe,"terrain",U.vertexBuffer,U.indexBuffer,U.segments),n.coordsIndex.push(F.tileID.key)}a.bindFramebuffer.set(null),a.viewport.set([0,0,_.width,_.height])}};class jc{constructor(n,a){this.drawFunctions=hy,this.context=new yd(n),this.transform=a,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:c.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=un.maxOverzooming+un.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Xn}resize(n,a,h){if(this.width=Math.floor(n*h),this.height=Math.floor(a*h),this.pixelRatio=h,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const f of this.style._order)this.style._layers[f].resize()}setup(){const n=this.context,a=new c.aU;a.emplaceBack(0,0),a.emplaceBack(c.a6,0),a.emplaceBack(0,c.a6),a.emplaceBack(c.a6,c.a6),this.tileExtentBuffer=n.createVertexBuffer(a,ls.members),this.tileExtentSegments=c.aV.simpleSegment(0,0,4,2);const h=new c.aU;h.emplaceBack(0,0),h.emplaceBack(c.a6,0),h.emplaceBack(0,c.a6),h.emplaceBack(c.a6,c.a6),this.debugBuffer=n.createVertexBuffer(h,ls.members),this.debugSegments=c.aV.simpleSegment(0,0,4,5);const f=new c.ch;f.emplaceBack(0,0,0,0),f.emplaceBack(c.a6,0,c.a6,0),f.emplaceBack(0,c.a6,0,c.a6),f.emplaceBack(c.a6,c.a6,c.a6,c.a6),this.rasterBoundsBuffer=n.createVertexBuffer(f,Pc.members),this.rasterBoundsSegments=c.aV.simpleSegment(0,0,4,2);const b=new c.aU;b.emplaceBack(0,0),b.emplaceBack(c.a6,0),b.emplaceBack(0,c.a6),b.emplaceBack(c.a6,c.a6),this.rasterBoundsBufferPosOnly=n.createVertexBuffer(b,ls.members),this.rasterBoundsSegmentsPosOnly=c.aV.simpleSegment(0,0,4,5);const E=new c.aU;E.emplaceBack(0,0),E.emplaceBack(1,0),E.emplaceBack(0,1),E.emplaceBack(1,1),this.viewportBuffer=n.createVertexBuffer(E,ls.members),this.viewportSegments=c.aV.simpleSegment(0,0,4,2);const C=new c.ci;C.emplaceBack(0),C.emplaceBack(1),C.emplaceBack(3),C.emplaceBack(2),C.emplaceBack(0),this.tileBorderIndexBuffer=n.createIndexBuffer(C);const k=new c.aW;k.emplaceBack(1,0,2),k.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=n.createIndexBuffer(k);const O=this.context.gl;this.stencilClearMode=new Bt({func:O.ALWAYS,mask:0},0,255,O.ZERO,O.ZERO,O.ZERO),this.tileExtentMesh=new nr(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const n=this.context,a=n.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const h=c.O();c.c7(h,0,this.width,this.height,0,0,1),c.S(h,h,[a.drawingBufferWidth,a.drawingBufferHeight,0]);const f={mainMatrix:h,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:h};this.useProgram("clippingMask",null,!0).draw(n,a.TRIANGLES,At.disabled,this.stencilClearMode,ir.disabled,Nt.disabled,null,null,f,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(n,a,h){if(this.currentStencilSource===n.source||!n.isTileClipped()||!(a!=null&&a.length))return;this.currentStencilSource=n.source,this.nextStencilID+a.length>256&&this.clearStencil();const f=this.context;f.setColorMode(ir.disabled),f.setDepthMode(At.disabled);const b={};for(const E of a)b[E.key]=this.nextStencilID++;this._renderTileMasks(b,a,h,!0),this._renderTileMasks(b,a,h,!1),this._tileClippingMaskIDs=b}_renderTileMasks(n,a,h,f){var b;const E=this.context,C=E.gl,k=this.style.projection,O=this.transform,F=this.useProgram("clippingMask");for(const U of a){const $=n[U.key],H=(b=this.style.map.terrain)===null||b===void 0?void 0:b.getTerrainData(U),oe=k.getMeshFromTileID(this.context,U.canonical,f,!0,"stencil"),de=O.getProjectionData({overscaledTileID:U,applyGlobeMatrix:!h,applyTerrainMatrix:!0});F.draw(E,C.TRIANGLES,At.disabled,new Bt({func:C.ALWAYS,mask:0},$,255,C.KEEP,C.KEEP,C.REPLACE),ir.disabled,h?Nt.disabled:Nt.backCCW,null,H,de,"$clipping",oe.vertexBuffer,oe.indexBuffer,oe.segments)}}_renderTilesDepthBuffer(){var n;const a=this.context,h=a.gl,f=this.style.projection,b=this.transform,E=this.useProgram("depth"),C=this.getDepthModeFor3D(),k=Vs(b,{tileSize:b.tileSize});for(const O of k){const F=(n=this.style.map.terrain)===null||n===void 0?void 0:n.getTerrainData(O),U=f.getMe
1256shFromTileID(this.context,O.canonical,!0,!0,"raster"),$=b.getProjectionData({overscaledTileID:O,applyGlobeMatrix:!0,applyTerrainMatrix:!0});E.draw(a,h.TRIANGLES,C,Bt.disabled,ir.disabled,Nt.backCCW,null,F,$,"$clipping",U.vertexBuffer,U.indexBuffer,U.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const n=this.nextStencilID++,a=this.context.gl;return new Bt({func:a.NOTEQUAL,mask:255},n,255,a.KEEP,a.KEEP,a.REPLACE)}stencilModeForClipping(n){const a=this.context.gl;return new Bt({func:a.EQUAL,mask:255},this._tileClippingMaskIDs[n.key],0,a.KEEP,a.KEEP,a.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(n){const a=this.context.gl,h=n.sort((E,C)=>C.overscaledZ-E.overscaledZ),f=h[h.length-1].overscaledZ,b=h[0].overscaledZ-f+1;if(b>1){this.currentStencilSource=void 0,this.nextStencilID+b>256&&this.clearStencil();const E={};for(let C=0;C<b;C++)E[C+f]=new Bt({func:a.GEQUAL,mask:255},C+this.nextStencilID,255,a.KEEP,a.KEEP,a.REPLACE);return this.nextStencilID+=b,[E,h]}return[{[f]:Bt.disabled},h]}stencilConfigForOverlapTwoPass(n){const a=this.context.gl,h=n.sort((E,C)=>C.overscaledZ-E.overscaledZ),f=h[h.length-1].overscaledZ,b=h[0].overscaledZ-f+1;if(this.clearStencil(),b>1){const E={},C={};for(let k=0;k<b;k++)E[k+f]=new Bt({func:a.GREATER,mask:255},b+1+k,255,a.KEEP,a.KEEP,a.REPLACE),C[k+f]=new Bt({func:a.GREATER,mask:255},1+k,255,a.KEEP,a.KEEP,a.REPLACE);return this.nextStencilID=2*b+1,[E,C,h]}return this.nextStencilID=3,[{[f]:new Bt({func:a.GREATER,mask:255},2,255,a.KEEP,a.KEEP,a.REPLACE)},{[f]:new Bt({func:a.GREATER,mask:255},1,255,a.KEEP,a.KEEP,a.REPLACE)},h]}colorModeForRenderPass(){const n=this.context.gl;return this._showOverdrawInspector?new ir([n.CONSTANT_COLOR,n.ONE],new c.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?ir.unblended:ir.alphaBlended}getDepthModeForSublayer(n,a,h){if(!this.opaquePassEnabledForLayer())return At.disabled;const f=1-((1+this.currentLayer)*this.numSublayers+n)*this.depthEpsilon;return new At(h||this.context.gl.LEQUAL,a,[f,f])}getDepthModeFor3D(){return new At(this.context.gl.LEQUAL,At.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(n,a){var h,f,b;this.style=n,this.options=a,this.lineAtlas=n.lineAtlas,this.imageManager=n.imageManager,this.glyphManager=n.glyphManager,this.symbolFadeChange=n.placement.symbolFadeChange(Y()),this.imageManager.beginFrame();const E=this.style._order,C=this.style.tileManagers,k={},O={},F={},U={isRenderingToTexture:!1,isRenderingGlobe:((h=n.projection)===null||h===void 0?void 0:h.transitionState)>0};for(const H in C){const oe=C[H];oe.used&&oe.prepare(this.context),k[H]=oe.getVisibleCoordinates(!1),O[H]=k[H].slice().reverse(),F[H]=oe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let H=0;H<E.length;H++)if(this.style._layers[E[H]].is3D()){this.opaquePassCutoff=H;break}this.maybeDrawDepth(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const H of E){const oe=this.style._layers[H];if(!oe.hasOffscreenPass()||oe.isHidden(this.transform.zoom))continue;const de=O[oe.source];(oe.type==="custom"||de.length)&&this.renderLayer(this,C[oe.source],oe,de,U)}if((f=this.style.projection)===null||f===void 0||f.updateGPUdependent({context:this.context,useProgram:H=>this.useProgram(H)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:a.showOverdrawInspector?c.bo.black:c.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=a.showOverdrawInspector,this.depthRangeFor3D=[0,1-(n._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=E.length-1;this.currentLayer>=0;this.currentLayer--){const H=this.style._layers[E[this.currentLayer]],oe=C[H.source],de=k[H.source];this._renderTileClippingMasks(H,de,!1),this.renderLayer(this,oe,H,de,U)}this.renderPass="translucent";let $=!1;for(this.currentLayer=0;this.currentLayer<E.length;this.currentLayer++){const H=this.style._layers[E[this.currentLayer]],oe=C[H.source];if(!((b=this.renderToTexture)===null||b===void 0)&&b.renderLayer(H,U))continue;this.opaquePassEnabledForLayer()||$||($=!0,U.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const de=(H.type==="symbol"?F:O)[H.source];this._renderTileClippingMasks(H,k[H.source],!!this.renderToTexture),this.renderLayer(this,oe,H,de,U)}if(U.isRenderingGlobe&&this.drawFunctions.atmosphere(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const H=function(oe,de){let me=null;const pe=Object.values(oe._layers).flatMap(fe=>fe.source&&!fe.isHidden(de)?[oe.tileManagers[fe.source]]:[]),ge=pe.filter(fe=>fe.getSource().type==="vector"),we=pe.filter(fe=>fe.getSource().type!=="vector"),ye=fe=>{(!me||me.getSource().maxzoom<fe.getSource().maxzoom)&&(me=fe)};for(const fe of ge)ye(fe);if(!me)for(const fe of we)ye(fe);return me}(this.style,this.transform.zoom);H&&this.drawFunctions.debug(this,H,H.getVisibleCoordinates())}this.options.showPadding&&this.drawFunctions.debugPadding(this),this.context.setDefault()}maybeDrawDepth(n){var a,h;if(!(!((h=(a=this.style)===null||a===void 0?void 0:a.map)===null||h===void 0)&&h.terrain))return;const f=this.terrainFacilitator.matrix,b=this.transform.modelViewProjectionMatrix;let E=this.terrainFacilitator.depthDirty;E||(E=n?!c.cj(f,b):!c.ck(f,b)),E||(E=this.style.map.terrain.tileManager.anyTilesAfterTime(this.terrainFacilitator.renderTime)),E&&(c.cl(f,b),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.depthDirty=!1,this.terrainFacilitator.coordsDirty=!0,this.drawFunctions.terrainDepth(this,this.style.map.terrain))}maybeDrawCoords(){var n,a;!((a=(n=this.style)===null||n===void 0?void 0:n.map)===null||a===void 0)&&a.terrain&&this.terrainFacilitator.coordsDirty&&(this.terrainFacilitator.coordsDirty=!1,this.drawFunctions.terrainCoords(this,this.style.map.terrain))}renderLayer(n,a,h,f,b){if(h.isHidden(this.transform.zoom)||h.type!=="background"&&h.type!=="custom"&&!(f||[]).length)return;this.id=h.id;const E=this.drawFunctions;c.aQ(h)?E.symbol(n,a,h,f,this.style.placement.variableOffsets,b):c.cm(h)?E.circle(n,a,h,f,b):c.cn(h)?E.heatmap(n,a,h,f,b):c.co(h)?E.line(n,a,h,f,b):c.cp(h)?E.fill(n,a,h,f,b):c.cq(h)?E.fillExtrusion(n,a,h,f,b):c.cr(h)?E.hillshade(n,a,h,f,b):c.cs(h)?E.colorRelief(n,a,h,f,b):c.bU(h)?E.raster(n,a,h,f,b):c.ct(h)?E.background(n,a,h,f,b):c.cu(h)&&E.custom(n,a,h,b)}saveTileTexture(n){const a=this._tileTextures[n.size[0]];
1256a?a.length<jc.MAX_TEXTURE_POOL_SIZE_PER_BUCKET?a.push(n):n.destroy():this._tileTextures[n.size[0]]=[n]}getTileTexture(n){const a=this._tileTextures[n];return a&&a.length>0?a.pop():null}isPatternMissing(n){if(!n)return!1;if(!n.from||!n.to)return!0;const a=this.imageManager.getPattern(n.from.toString()),h=this.imageManager.getPattern(n.to.toString());return!a||!h}useProgram(n,a,h=!1,f=[]){var b;this.cache||(this.cache={});const E=!!this.style.map.terrain,C=this.style.projection,k=h?gr.projectionMercator:C.shaderPreludeCode,O=h?zn:C.shaderDefine,F=n+(a?a.cacheKey:"")+`/${h?si:C.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(E?"/terrain":"")+(f?`/${f.join("/")}`:"");return(b=this.cache)[F]||(b[F]=new B0(this.context,gr[n],a,G0[n],this._showOverdrawInspector,E,k,O,f)),this.cache[F]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const n=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(n.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new c.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var n,a;if(this._tileTextures){for(const h in this._tileTextures){const f=this._tileTextures[h];if(f)for(const b of f)b.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((n=this.tileExtentMesh.vertexBuffer)===null||n===void 0||n.destroy()),this.tileExtentMesh&&((a=this.tileExtentMesh.indexBuffer)===null||a===void 0||a.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(const h in this.cache){const f=this.cache[h];f!=null&&f.program&&this.context.gl.deleteProgram(f.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){const{drawingBufferWidth:n,drawingBufferHeight:a}=this.context.gl;return this.width!==n||this.height!==a}}function lf(_,n){let a,h=!1,f=null;const b=()=>{f=null,h&&(_(...a),f=setTimeout(b,n),h=!1)};return(...E)=>(h=!0,a=E,f||b(),f)}jc.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Nc{constructor(n){this._getCurrentHash=()=>{const a=window.location.hash.replace("#","");if(this._hashName){let h;const f=a.split("&").map(b=>b.split("="));for(const b of f)b[0]===this._hashName&&(h=b);return(h&&h[1]||"").split("/")}return a.split("/")},this._onHashChange=()=>{const a=this._getCurrentHash();if(!this._isValidHash(a))return!1;const h=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(a[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+a[2],+a[1]],zoom:+a[0],bearing:h,pitch:+(a[4]||0)}),!0},this._updateHashUnthrottled=()=>{const a=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,a)},this._removeHash=()=>{const a=this._getCurrentHash();if(a.length===0)return;const h=a.join("/");let f=h;f.split("&").length>0&&(f=f.split("&")[0]),this._hashName&&(f=`${this._hashName}=${h}`);let b=window.location.hash.replace(f,"");b.startsWith("#&")?b=b.slice(0,1)+b.slice(2):b==="#"&&(b="");let E=window.location.href.replace(/(#.+)?$/,b);E=E.replace("&&","&"),window.history.replaceState(window.history.state,null,E)},this._updateHash=lf(this._updateHashUnthrottled,300),this._hashName=n&&encodeURIComponent(n)}addTo(n){return this._map=n,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(n){const a=this._map.getCenter(),h=Math.round(100*this._map.getZoom())/100,f=Math.ceil((h*Math.LN2+Math.log(512/360/.5))/Math.LN10),b=Math.pow(10,f),E=Math.round(a.lng*b)/b,C=Math.round(a.lat*b)/b,k=this._map.getBearing(),O=this._map.getPitch();let F="";if(F+=n?`/${E}/${C}/${h}`:`${h}/${C}/${E}`,(k||O)&&(F+="/"+Math.round(10*k)/10),O&&(F+=`/${Math.round(O)}`),this._hashName){const U=this._hashName;let $=!1;const H=window.location.hash.slice(1).split("&").map(oe=>{const de=oe.split("=")[0];return de===U?($=!0,`${de}=${F}`):oe}).filter(oe=>oe);return $||H.push(`${U}=${F}`),`#${H.join("&")}`}return`#${F}`}_isValidHash(n){if(n.length<3||n.some(isNaN))return!1;try{new c.W(+n[2],+n[1])}catch{return!1}const a=+n[0],h=+(n[3]||0),f=+(n[4]||0);return a>=this._map.getMinZoom()&&a<=this._map.getMaxZoom()&&h>=-180&&h<=180&&f>=this._map.getMinPitch()&&f<=this._map.getMaxPitch()}}const dl={linearity:.3,easing:c.cv(0,0,.3,1)},Ti=c.e({deceleration:2500,maxSpeed:1400},dl),qi=c.e({deceleration:20,maxSpeed:1400},dl),py=c.e({deceleration:1e3,maxSpeed:360},dl),Wi=c.e({deceleration:1e3,maxSpeed:90},dl),ex=c.e({deceleration:1e3,maxSpeed:360},dl);class tx{constructor(n){this._map=n,this.clear()}clear(){this._inertiaBuffer=[]}record(n){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:Y(),settings:n})}_drainInertiaBuffer(){const n=this._inertiaBuffer,a=Y();for(;n.length>0&&a-n[0].time>160;)n.shift()}_onMoveEnd(n){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const a={zoom:0,bearing:0,pitch:0,roll:0,pan:new c.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:b}of this._inertiaBuffer)a.zoom+=b.zoomDelta||0,a.bearing+=b.bearingDelta||0,a.pitch+=b.pitchDelta||0,a.roll+=b.rollDelta||0,b.panDelta&&a.pan._add(b.panDelta),b.around&&(a.around=b.around),b.pinchAround&&(a.pinchAround=b.pinchAround);const h=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,f={};if(a.pan.mag()){const b=ho(a.pan.mag(),h,c.e({},Ti,n||{})),E=a.pan.mult(b.amount/a.pan.mag()),C=this._map.cameraHelper.handlePanInertia(E,this._map.transform);f.center=C.easingCenter,f.offset=C.easingOffset,Bc(f,b)}if(a.zoom){const b=ho(a.zoom,h,qi);f.zoom=c.cw(this._map.transform.zoom+b.amount,this._map.getZoomSnap(),b.amount),Bc(f,b)}if(a.bearing){const b=ho(a.bearing,h,py);
vendor: 27,335 bytes, line 1256
1256f.bearing=this._map.transform.bearing+c.al(b.amount,-179,179),Bc(f,b)}if(a.pitch){const b=ho(a.pitch,h,Wi);f.pitch=this._map.transform.pitch+b.amount,Bc(f,b)}if(a.roll){const b=ho(a.roll,h,ex);f.roll=this._map.transform.roll+c.al(b.amount,-179,179),Bc(f,b)}if(f.zoom||f.bearing){const b=a.pinchAround===void 0?a.around:a.pinchAround;f.around=b?this._map.unproject(b):this._map.getCenter()}return this.clear(),c.e(f,{noMoveStart:!0})}}function Bc(_,n){(!_.duration||_.duration<n.duration)&&(_.duration=n.duration,_.easing=n.easing)}function ho(_,n,a){const{maxSpeed:h,linearity:f,deceleration:b}=a,E=c.al(_*f/(n/1e3),-h,h),C=Math.abs(E)/(b*f);return{easing:a.easing,duration:1e3*C,amount:E*(C/2)}}class ci extends c.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(n,a,h,f={}){h=h instanceof MouseEvent?h:new MouseEvent(n,h);const b=G.mousePos(a.getCanvas(),h),E=a.unproject(b);super(n,c.e({point:b,lngLat:E,originalEvent:h},f)),this._defaultPrevented=!1,this.target=a}}class Vc extends c.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(n,a,h){const f=n==="touchend"?h.changedTouches:h.touches,b=G.touchPos(a.getCanvasContainer(),f),E=b.map(k=>a.unproject(k)),C=b.reduce((k,O,F,U)=>k.add(O.div(U.length)),new c.P(0,0));super(n,{points:b,point:C,lngLats:E,lngLat:a.unproject(C),originalEvent:h}),this._defaultPrevented=!1}}class fy extends c.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(n,a,h){super(n,{originalEvent:h}),this._defaultPrevented=!1}}class rx{constructor(n,a){this._map=n,this._clickTolerance=a.clickTolerance}reset(){delete this._mousedownPos}wheel(n){return this._firePreventable(new fy(n.type,this._map,n))}mousedown(n,a){return this._mousedownPos=a,this._firePreventable(new ci(n.type,this._map,n))}mouseup(n){this._map.fire(new ci(n.type,this._map,n))}click(n,a){this._mousedownPos&&this._mousedownPos.dist(a)>=this._clickTolerance||this._map.fire(new ci(n.type,this._map,n))}dblclick(n){return this._firePreventable(new ci(n.type,this._map,n))}mouseover(n){this._map.fire(new ci(n.type,this._map,n))}mouseout(n){this._map.fire(new ci(n.type,this._map,n))}touchstart(n){return this._firePreventable(new Vc(n.type,this._map,n))}touchmove(n){this._map.fire(new Vc(n.type,this._map,n))}touchend(n){this._map.fire(new Vc(n.type,this._map,n))}touchcancel(n){this._map.fire(new Vc(n.type,this._map,n))}_firePreventable(n){if(this._map.fire(n),n.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class my{constructor(n){this._map=n}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(n){this._map.fire(new ci(n.type,this._map,n))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new ci("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(n){this._delayContextMenu?this._contextMenuEvent=n:this._ignoreContextMenu||this._map.fire(new ci(n.type,this._map,n)),this._map.listens("contextmenu")&&n.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Do{constructor(n){this._map=n}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(n){return this.transform.screenPointToLocation(c.P.convert(n),this._map.terrain)}}class po{constructor(n,a){this._map=n,this._tr=new Do(n),this._el=n.getCanvasContainer(),this._container=n.getContainer(),this._clickTolerance=a.clickTolerance||1,a.boxZoom&&typeof a.boxZoom=="object"&&(this._boxZoomEnd=a.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(n,a){this.isEnabled()&&n.shiftKey&&n.button===0&&(G.disableDrag(),this._startPos=this._lastPos=a,this._active=!0)}mousemoveWindow(n,a){if(!this._active)return;const h=a;if(this._lastPos.equals(h)||!this._box&&h.dist(this._startPos)<this._clickTolerance)return;const f=this._startPos;this._lastPos=h,this._box||(this._box=G.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",n));const b=Math.min(f.x,h.x),E=Math.max(f.x,h.x),C=Math.min(f.y,h.y),k=Math.max(f.y,h.y);this._box.style.transform=`translate(${b}px,${C}px)`,this._box.style.width=E-b+"px",this._box.style.height=k-C+"px"}mouseupWindow(n,a){if(!this._active||n.button!==0)return;const h=this._startPos,f=a;if(this.reset(),G.suppressClick(),h.x!==f.x||h.y!==f.y)return this._map.fire(new c.n("boxzoomend",{originalEvent:n})),this._boxZoomEnd?void this._boxZoomEnd(this._map,h,f,n):{cameraAnimation:b=>b.fitScreenCoordinates(h,f,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",n)}keydown(n){this._active&&n.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",n))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),G.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(n,a){return this._map.fire(new c.n(n,{originalEvent:a}))}}function ct(_,n){if(_.length!==n.length)throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${n.length}`);const a={};for(let h=0;h<_.length;h++)a[_[h].identifier]=n[h];return a}class gy{constructor(n){this.reset(),this.numTouches=n.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(n,a,h){(this.centroid||h.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=n.timeStamp),h.length===this.numTouches&&(this.centroid=function(f){const b=new c.P(0,0);for(const E of f)b._add(E);return b.div(f.length)}(a),this.touches=ct(h,a)))}touchmove(n,a,h){if(this.aborted||!this.centroid)return;const f=ct(h,a);for(const b in this.touches){const E=f[b];(!E||E.dist(this.touches[b])>30)&&(this.aborted=!0)}}touchend(n,a,h){if((!this.centroid||n.timeStamp-this.startTime>500)&&(this.aborted=!0),h.length===0){const f=!this.aborted&&this.centroid;if(this.reset(),f)return f}}}class Uc{constructor(n){this.singleTap=new gy(n),this.numTaps=n.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(n,a,h){this.singleTap.touchstart(n,a,h)}touchmove(n,a,h){this.singleTap.touchmove(n,a,h)}touchend(n,a,h){const f=this.singleTap.touchend(n,a,h);if(f){const b=n.timeStamp-this.lastTime<500,E=!this.lastTap||this.lastTap.dist(f)<30;if(b&&E||this.reset(),this.count++,this.lastTime=n.timeStamp,this.lastTap=f,this.count===this.numTaps)return this.reset(),f}}}class yy{constructor(n){this._tr=new Do(n),this._zoomIn=new Uc({numTouches:1,numTaps:2}),this._zoomOut=new Uc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(n,a,h){this._zoomIn.touchstart(n,a,h),this._zoomOut.touchstart(n,a,h)}touchmove(n,a,h){this._zoomIn.touchmove(n,a,h),this._zoomOut.touchmove(n,a,h)}touchend(n,a,h){const f=this._zoomIn.touchend(n,a,h),b=this._zoomOut.touchend(n,a,h),E=this._tr;return f?(this._active=!0,n.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:C=>C.easeTo({duration:300,zoom:c.cw(E.zoom+1,C.getZoomSnap()),around:E.unproject(f)},{originalEvent:n})}):b?(this._active=!0,n.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:C=>C.easeTo({duration:300,zoom:c.cw(E.zoom-1,C.getZoomSnap()),around:E.unproject(b)},{originalEvent:n})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Lo{constructor(n){this._enabled=!!n.enable,this._moveStateManager=n.moveStateManager,this._clickTolerance=n.clickTolerance||1,this._moveFunction=n.move,this._activateOnStart=!!n.activateOnStart,n.assignEvents(this),this.reset()}reset(n){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(n)}_move(...n){const a=this._moveFunction(...n);if(a.bearingDelta||a.pitchDelta||a.rollDelta||a.around||a.panDelta)return this._active=!0,a}dragStart(n,a){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(n)&&(this._moveStateManager.startMove(n),this._lastPoint=Array.isArray(a)?a[0]:a,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(n,a){if(!this.isEnabled())return;const h=this._lastPoint;if(!h)return;if(n.preventDefault(),!this._moveStateManager.isValidMoveEvent(n))return void this.reset(n);const f=Array.isArray(a)?a[0]:a;return!this._moved&&f.dist(h)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=f,this._move(h,f))}dragEnd(n){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(n)&&(this._moved&&G.suppressClick(),this.reset(n))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const $c=0,cf=2,nx={[$c]:1,[cf]:2};class oa{constructor(n){this._correctEvent=n.checkCorrectEvent}startMove(n){this._eventButton=n.button}endMove(n){delete this._eventButton}isValidStartEvent(n){return this._correctEvent(n)}isValidMoveEvent(n){return!function(a,h){const f=nx[h];return a.buttons===void 0||(a.buttons&f)!==f}(n,this._eventButton)}isValidEndEvent(n){return n.button===this._eventButton}}class _y{constructor(){this._firstTouch=void 0}_isOneFingerTouch(n){return n.targetTouches.length===1}_isSameTouchEvent(n){return n.targetTouches[0].identifier===this._firstTouch}startMove(n){this._firstTouch=n.targetTouches[0].identifier}endMove(n){delete this._firstTouch}isValidStartEvent(n){return this._isOneFingerTouch(n)}isValidMoveEvent(n){return this._isOneFingerTouch(n)&&this._isSameTouchEvent(n)}isValidEndEvent(n){return this._isOneFingerTouch(n)&&this._isSameTouchEvent(n)}}class uf{constructor(n=new oa({checkCorrectEvent:()=>!0}),a=new _y){this.mouseMoveStateManager=n,this.oneFingerTouchMoveStateManager=a}_executeRelevantHandler(n,a,h){return n instanceof MouseEvent?a(n):typeof TouchEvent<"u"&&n instanceof TouchEvent?h(n):void 0}startMove(n){this._executeRelevantHandler(n,a=>{this.mouseMoveStateManager.startMove(a)},a=>{this.oneFingerTouchMoveStateManager.startMove(a)})}endMove(n){this._executeRelevantHandler(n,a=>{this.mouseMoveStateManager.endMove(a)},a=>{this.oneFingerTouchMoveStateManager.endMove(a)})}isValidStartEvent(n){return this._executeRelevantHandler(n,a=>this.mouseMoveStateManager.isValidStartEvent(a),a=>this.oneFingerTouchMoveStateManager.isValidStartEvent(a))}isValidMoveEvent(n){return this._executeRelevantHandler(n,a=>this.mouseMoveStateManager.isValidMoveEvent(a),a=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(a))}isValidEndEvent(n){return this._executeRelevantHandler(n,a=>this.mouseMoveStateManager.isValidEndEvent(a),a=>this.oneFingerTouchMoveStateManager.isValidEndEvent(a))}}const bd=_=>{_.mousedown=_.dragStart,_.mousemoveWindow=_.dragMove,_.mouseup=_.dragEnd,_.contextmenu=n=>{n.preventDefault()}};class vy{constructor(n,a){this._clickTolerance=n.clickTolerance||1,this._map=a,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new c.P(0,0)}_shouldBePrevented(n){return n<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(n,a,h){return this._calculateTransform(n,a,h)}touchmove(n,a,h){if(this._active){if(!this._shouldBePrevented(h.length))return n.preventDefault(),this._calculateTransform(n,a,h);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",n)}}touchend(n,a,h){this._calculateTransform(n,a,h),this._active&&this._shouldBePrevented(h.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(n,a,h){h.length>0&&(this._active=!0);const f=ct(h,a),b=new c.P(0,0),E=new c.P(0,0);let C=0;for(const O in f){const F=f[O],U=this._touches[O];U&&(b._add(F),E._add(F.sub(U)),C++,f[O]=F)}if(this._touches=f,this._shouldBePrevented(C)||!E.mag())return;const k=E.div(C);return this._sum._add(k),this._sum.mag()<this._clickTolerance?void 0:{around:b.div(C),panDelta:k}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class df{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(n,a,h){this._firstTwoTouches||h.length<2||(this._firstTwoTouches=[h[0].identifier,h[1].identifier],this._start([a[0],a[1]]))}touchmove(n,a,h){if(!this._firstTwoTouches)return;n.preventDefault();const[f,b]=this._firstTwoTouches,E=wd(h,a,f),C=wd(h,a,b);if(!E||!C)return;const k=this._aroundCenter?null:E.add(C).div(2);return this._move([E,C],k,n)}touchend(n,a,h){if(!this._firstTwoTouches)return;const[f,b]=this._firstTwoTouches,E=wd(h,a,f),C=wd(h,a,b);E&&C||(this._active&&G.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(n){this._enabled=!0,this._aroundCenter=!!n&&n.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function wd(_,n,a){for(let h=0;h<_.length;h++)if(_[h].identifier===a)return n[h]}function hf(_,n){return Math.log(_/n)/Math.LN2}class xy extends df{constructor(){super(),this._zoomRate=1,this._zoomThreshold=.1}setZoomRate(n){this._zoomRate=n??1}setZoomThreshold(n){this._zoomThreshold=n??.1}reset(){super.reset(),delete this._distance,delete this._startDistance}_start(n){this._startDistance=this._distance=n[0].dist(n[1])}_move(n,a){const h=this._distance;if(this._distance=n[0].dist(n[1]),this._active||!(Math.abs(hf(this._distance,this._startDistance))<this._zoomThreshold))return this._active=!0,{zoomDelta:hf(this._distance,h)*this._zoomRate,pinchAround:a}}}function pf(_,n){return 180*_.angleWith(n)/Math.PI}class by extends df{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(n){this._startVector=this._vector=n[0].sub(n[1]),this._minDiameter=n[0].dist(n[1])}_move(n,a,h){const f=this._vector;if(this._vector=n[0].sub(n[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:pf(this._vector,f),pinchAround:a}}_isBelowThreshold(n){this._minDiameter=Math.min(this._minDiameter,n.mag());const a=25/(Math.PI*this._minDiameter)*360,h=pf(n,this._startVector);return Math.abs(h)<a}}function ff(_){return Math.abs(_.y)>Math.abs(_.x)}class zo extends df{constructor(n){super(),this._currentTouchCount=0,this._map=n}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(n,a,h){super.touchstart(n,a,h),this._currentTouchCount=h.length}_start(n){this._lastPoints=n,ff(n[0].sub(n[1]))&&(this._valid=!1)}_move(n,a,h){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const f=n[0].sub(this._lastPoints[0]),b=n[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(f,b,h.timeStamp),this._valid?(this._lastPoints=n,this._active=!0,{pitchDelta:(f.y+b.y)/2*-.5}):void 0}gestureBeginsVertically(n,a,h){if(this._valid!==void 0)return this._valid;const f=n.mag()>=2,b=a.mag()>=2;if(!f&&!b)return;if(!f||!b)return this._firstMove===void 0&&(this._firstMove=h),h-this._firstMove<100&&void 0;const E=n.y>0==a.y>0;return ff(n)&&ff(a)&&E}}const or={panStep:100,bearingStep:15,pitchStep:10};class wy{constructor(n){this._tr=new Do(n);const a=or;this._panStep=a.panStep,this._bearingStep=a.bearingStep,this._pitchStep=a.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(n){if(n.altKey||n.ctrlKey||n.metaKey)return;let a=0,h=0,f=0,b=0,E=0;switch(n.keyCode){case 61:case 107:case 171:case 187:a=1;break;case 189:case 109:case 173:a=-1;break;case 37:n.shiftKey?h=-1:(n.preventDefault(),b=-1);break;case 39:n.shiftKey?h=1:(n.preventDefault(),b=1);break;case 38:n.shiftKey?f=1:(n.preventDefault(),E=-1);break;case 40:n.shiftKey?f=-1:(n.preventDefault(),E=1);break;default:return}return this._rotationDisabled&&(h=0,f=0),{cameraAnimation:C=>{const k=this._tr;C.easeTo({duration:300,easeId:"keyboardHandler",easing:Sd,zoom:a?c.cw(k.zoom+a*(n.shiftKey?2:1),C.getZoomSnap()):k.zoom,bearing:k.bearing+h*this._bearingStep,pitch:k.pitch+f*this._pitchStep,offset:[-b*this._panStep,-E*this._panStep],center:k.center},{originalEvent:n})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Sd(_){return _*(2-_)}const Gc=4.000244140625,mf=1/450;class gf{constructor(n,a){this._onTimeout=h=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(h)},this._map=n,this._tr=new Do(n),this._triggerRenderFrame=a,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=mf}setZoomRate(n){this._defaultZoomRate=n}setWheelZoomRate(n){this._wheelZoomRate=n}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(n){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!n&&n.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(n){return!!this._map.cooperativeGestures.isEnabled()&&!(n.ctrlKey||this._map.cooperativeGestures.isBypassed(n))}wheel(n){if(!this.isEnabled())return;if(this._shouldBePrevented(n))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",n);let a=n.deltaMode===WheelEvent.DOM_DELTA_LINE?40*n.deltaY:n.deltaY;const h=Y(),f=h-(this._lastWheelEventTime||0);this._lastWheelEventTime=h,a!==0&&a%Gc==0?this._type="wheel":a!==0&&Math.abs(a)<4?this._type="trackpad":f>400?(this._type=null,this._lastValue=a,this._timeout=setTimeout(this._onTimeout,40,n)):this._type||(this._type=Math.abs(f*a)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,a+=this._lastValue)),n.shiftKey&&a&&(a/=4),this._type&&(this._lastWheelEvent=n,this._delta-=a,this._active||this._start(n)),n.preventDefault()}_start(n){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const a=G.mousePos(this._map.getCanvas(),n),h=this._tr;this._aroundPoint=this._aroundCenter?h.transform.locationToScreenPoint(c.W.convert(h.center)):a,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;const n=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const C=n.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=C),typeof this._targetZoom=="number"&&(this._targetZoom+=C)}if(this._delta!==0){const C=this._type==="wheel"&&Math.abs(this._delta)>Gc?this._wheelZoomRate:this._defaultZoomRate;let k=2/(1+Math.exp(-Math.abs(this._delta*C)));this._delta<0&&k!==0&&(k=1/k);const O=typeof this._targetZoom!="number"?n.scale:c.ao(this._targetZoom),F=n.applyConstrain(n.getCameraLngLat(),c.ar(O*k)).zoom,U=this._map.getZoomSnap();if(this._type==="wheel"&&U>0){const $=c.cw(n.zoom,U);this._targetZoom=c.cw(F,U,F-$)}else this._targetZoom=F;this._type==="wheel"&&(this._startZoom=n.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const a=typeof this._targetZoom!="number"?n.zoom:this._targetZoom,h=this._startZoom,f=this._easing;let b,E=!1;if(this._type==="wheel"&&h&&f){const C=Y()-this._lastWheelEventTime,k=Math.min((C+5)/200,1),O=f(k);b=c.H.number(h,a,O),k<1?this._needsRerender=!0:E=!0}else b=a,E=!0;return this._active=!0,E&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=b,{noInertia:!0,needsRenderFrame:!E,zoomDelta:b-n.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(n){let a=c.cy;if(this._prevEase){const h=this._prevEase,f=(Y()-h.start)/h.duration,b=h.easing(f+.01)-h.easing(f),E=.27/Math.sqrt(b*b+1e-4)*.01,C=Math.sqrt(.0729-E*E);a=c.cv(E,C,.25,1)}return this._prevEase={start:Y(),duration:n,easing:a},a}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class yf{constructor(n,a){this._clickZoom=n,this._tapZoom=a}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Sy{constructor(n){this._tr=new Do(n),this.reset()}reset(){this._active=!1}dblclick(n,a){return n.preventDefault(),{cameraAnimation:h=>{h.easeTo({duration:300,zoom:c.cw(this._tr.zoom+(n.shiftKey?-1:1),h.getZoomSnap()),around:this._tr.unproject(a)},{originalEvent:n})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ix{constructor(){this._tap=new Uc({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(n){this._zoomRate=n??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(n,a,h){if(!this._swipePoint)if(this._tapTime){const f=a[0],b=n.timeStamp-this._tapTime<500,E=this._tapPoint.dist(f)<30;b&&E?h.length>0&&(this._swipePoint=f,this._swipeTouch=h[0].identifier):this.reset()}else this._tap.touchstart(n,a,h)}touchmove(n,a,h){if(this._tapTime){if(this._swipePoint){if(h[0].identifier!==this._swipeTouch)return;const f=a[0],b=f.y-this._swipePoint.y;return this._swipePoint=f,n.preventDefault(),this._active=!0,{zoomDelta:b/128*this._zoomRate}}}else this._tap.touchmove(n,a,h)}touchend(n,a,h){if(this._tapTime)this._swipePoint&&h.length===0&&this.reset();else{const f=this._tap.touchend(n,a,h);f&&(this._tapTime=n.timeStamp,this._tapPoint=f)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Zi{constructor(n,a,h){this._el=n,this._mousePan=a,this._touchPan=h}enable(n){this._inertiaOptions=n||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class qc{constructor(n,a,h,f){this._pitchWithRotate=n.pitchWithRotate,this._rollEnabled=n.rollEnabled,this._mouseRotate=a,this._mousePitch=h,this._mouseRoll=f}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class ft{constructor(n,a,h,f){this._el=n,this._touchZoom=a,this._touchRotate=h,this._tapDragZoom=f,this._rotationDisabled=!1,this._enabled=!0}enable(n){this._touchZoom.enable(n),this._rotationDisabled||this._touchRotate.enable(n),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(n){this._touchZoom.setZoomRate(n),this._tapDragZoom.setZoomRate(n)}setZoomThreshold(n){this._touchZoom.setZoomThreshold(n)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class vt{constructor(n,a){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=n,this._options=a,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const n=this._map.getCanvasContainer();n.classList.add("maplibregl-cooperative-gestures"),this._container=G.create("div","maplibregl-cooperative-gesture-screen",n);let a=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(a=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const h=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),f=document.createElement("div");f.className="maplibregl-desktop-message",f.textContent=a,this._container.appendChild(f);const b=document.createElement("div");b.className="maplibregl-mobile-message",b.textContent=h,this._container.appendChild(b),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(n){return n[this._bypassKey]}notifyGestureBlocked(n,a){this._enabled&&(this._map.fire(new c.n("cooperativegestureprevented",{gestureType:n,originalEvent:a})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const hs=_=>_.zoom||_.drag||_.roll||_.pitch||_.rotate;class Ty extends c.n{}function hl(_){var n;return((n=_.panDelta)===null||n===void 0?void 0:n.mag())||_.zoomDelta||_.bearingDelta||_.pitchDelta||_.rollDelta}class Fn{get _ownerDocument(){var n;return((n=this._el)===null||n===void 0?void 0:n.ownerDocument)||document}get _ownerWindow(){var n,a;return((a=(n=this._el)===null||n===void 0?void 0:n.ownerDocument)===null||a===void 0?void 0:a.defaultView)||window}constructor(n,a){this.handleWindowEvent=f=>{this.handleEvent(f,`${f.type}Window`)},this.handleEvent=(f,b)=>{if(f.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const E=f.type==="renderFrame"?void 0:f,C={needsRenderFrame:!1},k={},O={};for(const{handlerName:$,handler:H,allowed:oe}of this._handlers){if(!H.isEnabled())continue;let de;if(this._blockedByActive(O,oe,$))H.reset();else if(H[b||f.type]){if(c.cz(f,b||f.type)){const me=G.mousePos(this._map.getCanvas(),f);de=H[b||f.type](f,me)}else if(c.cA(f,b||f.type)){const me=this._getMapTouches(f.touches),pe=G.touchPos(this._map.getCanvas(),me);de=H[b||f.type](f,pe,me)}else c.cB(b||f.type)||(de=H[b||f.type](f));this.mergeHandlerResult(C,k,de,$,E),de!=null&&de.needsRenderFrame&&this._triggerRe
vendor: 4,174 bytes, line 1256
1256nderFrame()}(de||H.isActive())&&(O[$]=H)}const F={};for(const $ in this._previousActiveHandlers)O[$]||(F[$]=E);this._previousActiveHandlers=O,(Object.keys(F).length||hl(C))&&(this._changes.push([C,k,F]),this._triggerRenderFrame()),(Object.keys(O).length||hl(C))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:U}=C;U&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],U(this._map))},this._map=n,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new tx(n),this._bearingSnap=a.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(a);const h=this._el;this._listeners=[[h,"touchstart",{passive:!0}],[h,"touchmove",{passive:!1}],[h,"touchend",void 0],[h,"touchcancel",void 0],[h,"mousedown",void 0],[h,"mousemove",void 0],[h,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[h,"mouseover",void 0],[h,"mouseout",void 0],[h,"dblclick",void 0],[h,"click",void 0],[h,"keydown",{capture:!1}],[h,"keyup",void 0],[h,"wheel",{passive:!1}],[h,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(const[f,b,E]of this._listeners)f.addEventListener(b,f===this._ownerDocument?this.handleWindowEvent:this.handleEvent,E)}destroy(){for(const[n,a,h]of this._listeners)n.removeEventListener(a,n===this._ownerDocument?this.handleWindowEvent:this.handleEvent,h)}_addDefaultHandlers(n){const a=this._map,h=a.getCanvasContainer();this._add("mapEvent",new rx(a,n));const f=a.boxZoom=new po(a,n);this._add("boxZoom",f),n.interactive&&n.boxZoom&&f.enable();const b=a.cooperativeGestures=new vt(a,n.cooperativeGestures);this._add("cooperativeGestures",b),n.cooperativeGestures&&b.enable();const E=new yy(a),C=new Sy(a);a.doubleClickZoom=new yf(C,E),this._add("tapZoom",E),this._add("clickZoom",C),n.interactive&&n.doubleClickZoom&&a.doubleClickZoom.enable();const k=new ix;this._add("tapDragZoom",k);const O=a.touchPitch=new zo(a);this._add("touchPitch",O),n.interactive&&n.touchPitch&&a.touchPitch.enable(n.touchPitch);const F=()=>a.project(a.getCenter()),U=function({enable:ye,clickTolerance:fe,aroundCenter:be=!0,minPixelCenterThreshold:_e=100,rotateDegreesPerPixelMoved:Ie=.8},je){const Ne=new oa({checkCorrectEvent:Xe=>Xe.button===0&&Xe.ctrlKey||Xe.button===2&&!Xe.ctrlKey});return new Lo({clickTolerance:fe,move:(Xe,He)=>{const pt=je();if(be&&Math.abs(pt.y-Xe.y)>_e)return{bearingDelta:c.cx(new c.P(Xe.x,He.y),He,pt)};let rt=(He.x-Xe.x)*Ie;return be&&He.y<pt.y&&(rt=-rt),{bearingDelta:rt}},moveStateManager:Ne,enable:ye,assignEvents:bd})}(n,F),$=function({enable:ye,clickTolerance:fe,pitchDegreesPerPixelMoved:be=-.5}){const _e=new oa({checkCorrectEvent:Ie=>Ie.button===0&&Ie.ctrlKey||Ie.button===2});return new Lo({clickTolerance:fe,move:(Ie,je)=>({pitchDelta:(je.y-Ie.y)*be}),moveStateManager:_e,enable:ye,assignEvents:bd})}(n),H=function({enable:ye,clickTolerance:fe,rollDegreesPerPixelMoved:be=.3},_e){const Ie=new oa({checkCorrectEvent:je=>je.button===2&&je.ctrlKey});return new Lo({clickTolerance:fe,move:(je,Ne)=>{const Xe=_e();let He=(Ne.x-je.x)*be;return Ne.y<Xe.y&&(He=-He),{rollDelta:He}},moveStateManager:Ie,enable:ye,assignEvents:bd})}(n,F);a.dragRotate=new qc(n,U,$,H),this._add("mouseRotate",U,["mousePitch"]),this._add("mousePitch",$,["mouseRotate","mouseRoll"]),this._add("mouseRoll",H,["mousePitch"]),n.interactive&&n.dragRotate&&a.dragRotate.enable();const oe=function({enable:ye,clickTolerance:fe}){const be=new oa({checkCorrectEvent:_e=>_e.button===0&&!_e.ctrlKey});return new Lo({clickTolerance:fe,move:(_e,Ie)=>({around:Ie,panDelta:Ie.sub(_e)}),activateOnStart:!0,moveStateManager:be,enable:ye,assignEvents:bd})}(n),de=new vy(n,a);a.dragPan=new Zi(h,oe,de),this._add("mousePan",oe),this._add("touchPan",de,["touchZoom","touchRotate"]),n.interactive&&n.dragPan&&a.dragPan.enable(n.dragPan);const me=new by,pe=new xy;a.touchZoomRotate=new ft(h,pe,me,k),this._add("touchRotate",me,["touchPan","touchZoom"]),this._add("touchZoom",pe,["touchPan","touchRotate"]),n.interactive&&n.touchZoomRotate&&a.touchZoomRotate.enable(n.touchZoomRotate),this._add("blockableMapEvent",new my(a)
vendor: 4,150 bytes, line 1256
1256);const ge=a.scrollZoom=new gf(a,()=>this._triggerRenderFrame());this._add("scrollZoom",ge,["mousePan"]),n.interactive&&n.scrollZoom&&a.scrollZoom.enable(n.scrollZoom);const we=a.keyboard=new wy(a);this._add("keyboard",we),n.interactive&&n.keyboard&&a.keyboard.enable()}_add(n,a,h){this._handlers.push({handlerName:n,handler:a,allowed:h}),this._handlersById[n]=a}stop(n){if(!this._updatingCamera){for(const{handler:a}of this._handlers)a.reset();this._inertia.clear(),this._fireEvents({},{},n),this._changes=[]}}isActive(){for(const{handler:n}of this._handlers)if(n.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!hs(this._eventsInProgress)||this.isZooming()}_blockedByActive(n,a,h){for(const f in n)if(f!==h&&!(a!=null&&a.includes(f)))return!0;return!1}_getMapTouches(n){const a=[];for(const h of n)this._el.contains(h.target)&&a.push(h);return a}mergeHandlerResult(n,a,h,f,b){if(!h)return;c.e(n,h);const E={handlerName:f,originalEvent:h.originalEvent||b};h.zoomDelta!==void 0&&(a.zoom=E),h.panDelta!==void 0&&(a.drag=E),h.rollDelta!==void 0&&(a.roll=E),h.pitchDelta!==void 0&&(a.pitch=E),h.bearingDelta!==void 0&&(a.rotate=E)}_applyChanges(){const n={},a={},h={};for(const[f,b,E]of this._changes)f.panDelta&&(n.panDelta=(n.panDelta||new c.P(0,0))._add(f.panDelta)),f.zoomDelta&&(n.zoomDelta=(n.zoomDelta||0)+f.zoomDelta),f.bearingDelta&&(n.bearingDelta=(n.bearingDelta||0)+f.bearingDelta),f.pitchDelta&&(n.pitchDelta=(n.pitchDelta||0)+f.pitchDelta),f.rollDelta&&(n.rollDelta=(n.rollDelta||0)+f.rollDelta),f.around!==void 0&&(n.around=f.around),f.pinchAround!==void 0&&(n.pinchAround=f.pinchAround),f.noInertia&&(n.noInertia=f.noInertia),c.e(a,b),c.e(h,E);this._updateMapTransform(n,a,h),this._changes=[]}_updateMapTransform(n,a,h){const f=this._map,b=f._getTransformForUpdate(),E=f.terrain;if(!(hl(n)||E&&this._terrainMovement))return void this._fireEvents(a,h,!0);f._stop(!0);let{panDelta:C,zoomDelta:k,bearingDelta:O,pitchDelta:F,rollDelta:U,around:$,pinchAround:H}=n;H!==void 0&&($=H),$||($=f.transform.centerPoint),E&&!b.isPointOnMapSurface($)&&($=b.centerPoint);const oe={panDelta:C,zoomDelta:k,rollDelta:U,pitchDelta:F,bearingDelta:O,around:$};this._map.cameraHelper.useGlobeControls&&!b.isPointOnMapSurface($)&&($=b.centerPoint);const de=$.distSqr(b.centerPoint)<.01?b.center:b.screenPointToLocation(C?$.sub(C):$);this._handleMapControls({terrain:E,tr:b,deltasForHelper:oe,preZoomAroundLoc:de,combinedEventsInProgress:a,panDelta:C}),f._applyUpdatedTransform(b),this._map._update(),n.noInertia||this._inertia.record(n),this._fireEvents(a,h,!0)}_handleMapControls({terrain:n,tr:a,deltasForHelper:h,preZoomAroundLoc:f,combinedEventsInProgress:b,panDelta:E}){const C=this._map.cameraHelper;if(C.handleMapControlsRollPitchBearingZoom(h,a),n)return C.useGlobeControls?(this._terrainMovement||!b.drag&&!b.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void C.handleMapControlsPan(h,a,f)):this._terrainMovement||!b.drag&&!b.zoom?void(b.drag&&this._terrainMovement&&E?a.setCenter(a.screenPointToLocation(a.centerPoint.sub(E))):C.handleMapControlsPan(h,a,f)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void C.handleMapControlsPan(h,a,f));C.handleMapControlsPan(h,a,f)}_fireEvents(n,a,h){const f=hs(this._eventsInProgress),b=hs(n),E={};for(const U in n){const{originalEvent:$}=n[U];this._eventsInProgress[U]||(E[`${U}start`]=$),this._eventsInProgress[U]=n[U]}!f&&b&&this._fireEvent("movestart",b.originalEvent);for(const U in E)this._fireEvent(U,E[U]);b&&this._fireEvent("move",b.originalEvent);for(const U in n){const{originalEvent:$}=n[U];this._fireEvent(U,$)}const C={};let k;for(const U in this._eventsInProgress){const{handlerName:$,originalEvent:H}=this._eventsInProgress[U];this._handlersById[$].isActive()||(delete this._eventsInProgress[U],k=a[$]||H,C[`${U}end`]=k)}for(const U in C)this._fireEvent(U,C[U]);const O=hs(this._eventsInProgress),F=(f||b)&&!O;if(F&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const U=this._map._getTransformForUpdate();
1256this._map.getCenterClampedToGround()&&U.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(U)}if(h&&F){this._updatingCamera=!0;const U=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),$=H=>H!==0&&-this._bearingSnap<H&&H<this._bearingSnap;!U||!U.essential&&Z.prefersReducedMotion?(this._map.fire(new c.n("moveend",{originalEvent:k})),$(this._map.getBearing())&&this._map.resetNorth()):($(U.bearing||this._map.getBearing())&&(U.bearing=0),U.freezeElevation=!0,this._map.easeTo(U,{originalEvent:k})),this._updatingCamera=!1}}_fireEvent(n,a){this._map.fire(new c.n(n,a?{originalEvent:a}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(n=>{delete this._frameId,this.handleEvent(new Ty("renderFrame",{timeStamp:n})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ey extends c.E{constructor(n,a,h){super(),this._renderFrameCallback=()=>{const f=Math.min((Y()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(f)),f<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=n,this._bearingSnap=h.bearingSnap,this._zoomSnap=h.zoomSnap,this.cameraHelper=a,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(n,a){n.apply(this.transform,!0),this.transform=n,this.cameraHelper=a}getCenter(){return new c.W(this.transform.center.lng,this.transform.center.lat)}setCenter(n,a){return this.jumpTo({center:n},a)}getCenterElevation(){return this.transform.elevation}setCenterElevation(n,a){return this.jumpTo({elevation:n},a),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(n){this._centerClampedToGround=n}panBy(n,a,h){return n=c.P.convert(n).mult(-1),this.panTo(this.transform.center,c.e({offset:n},a),h)}panTo(n,a,h){return this.easeTo(c.e({center:n},a),h)}getZoom(){return this.transform.zoom}setZoom(n,a){return this.jumpTo({zoom:n},a),this}zoomTo(n,a,h){return this.easeTo(c.e({zoom:n},a),h)}zoomIn(n,a){return this.zoomTo(c.cw(this.getZoom()+1,this._zoomSnap),n,a),this}zoomOut(n,a){return this.zoomTo(c.cw(this.getZoom()-1,this._zoomSnap),n,a),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(n,a){return n!=this.transform.fov&&(this.transform.setFov(n),this.fire(new c.n("movestart",a)).fire(new c.n("move",a)).fire(new c.n("moveend",a))),this}getBearing(){return this.transform.bearing}setZoomSnap(n){return this._zoomSnap=n,this}getZoomSnap(){return this._zoomSnap}setBearing(n,a){return this.jumpTo({bearing:n},a),this}getPadding(){return this.transform.padding}setPadding(n,a){return this.jumpTo({padding:n},a),this}rotateTo(n,a,h){return this.easeTo(c.e({bearing:n},a),h)}resetNorth(n,a){return this.rotateTo(0,c.e({duration:1e3},n),a),this}resetNorthPitch(n,a){return this.easeTo(c.e({bearing:0,pitch:0,roll:0,duration:1e3},n),a),this}snapToNorth(n,a){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(n,a):this}getPitch(){return this.transform.pitch}setPitch(n,a){return this.jumpTo({pitch:n},a),this}getRoll(){return this.transform.roll}setRoll(n,a){return this.jumpTo({roll:n},a),this}cameraForBounds(n,a){n=bt.convert(n).adjustAntiMeridian();const h=(a==null?void 0:a.bearing)||0;return this._cameraForBoxAndBearing(n.getNorthWest(),n.getSouthEast(),h,a)}_cameraForBoxAndBearing(n,a,h,f){const b={top:0,bottom:0,right:0,left:0};if(typeof(f=c.e({padding:b,offset:[0,0],maxZoom:this.transform.maxZoom},f)).padding=="number"){const F=f.padding;f.padding={top:F,bottom:F,right:F,left:F}}const E=c.e(b,f.padding);f.padding=E;const C=this.transform,k=new bt(n,a),O=this.cameraHelper.cameraForBoxAndBearing(f,E,k,h,C);return O&&this._zoomSnap&&(O.zoom=c.cw(O.zoom,this._zoomSnap,-1)),O}fitBounds(n,a,h){return this._fitInternal(this.cameraForBounds(n,a),a,h)}fitScreenCoordinates(n,a,h,f,b){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(c.P.convert(n)),this.transform.screenPointToLocation(c.P.convert(a)),h,f),f,b)}_fitInternal(n,a,h){return n?(delete(a=c.e(n,a)).padding,a.linear?this.easeTo(a,h):this.flyTo(a,h)):this}jumpTo(n,a){this.stop(),"zoom"in n&&this._zoomSnap&&(n.zoom=c.cw(n.zoom,this._zoomSnap));const h=this._getTransformForUpdate();let f=!1,b=!1,E=!1;const C=h.zoom;this.terrain&&h.setElevation(this.terrain.getElevationForLngLatZoom(n.center?c.W.convert(n.center):h.center,n.zoom||h.tileZoom)),this.cameraHelper.handleJumpToCenterZoom(h,n);const k=h.zoom!==C;return"elevation"in n&&h.elevation!==+n.elevation&&h.setElevation(+n.elevation),"bearing"in n&&h.bearing!==+n.bearing&&(f=!0,h.setBearing(+n.bearing)),"pitch"in n&&h.pitch!==+n.pitch&&(b=!0,h.setPitch(+n.pitch)),"roll"in n&&h.roll!==+n.roll&&(E=!0,h.setRoll(+n.roll)),n.padding==null||h.isPaddingEqual(n.padding)||h.setPadding(n.padding),this._applyUpdatedTransform(h),this.fire(new c.n("movestart",a)).fire(new c.n("move",a)),k&&this.fire(new c.n("zoomstart",a)).fire(new c.n("zoom",a)).fire(new c.n("zoomend",a)),f&&this.fire(new c.n("rotatestart",a)).fire(new c.n("rotate",a)).fire(new c.n("rotateend",a)),b&&this.fire(new c.n("pitchstart",a)).fire(new c.n("pitch",a)).fire(new c.n("pitchend",a)),E&&this.fire(new c.n("rollstart",a)).fire(new c.n("roll",a)).fire(new c.n("rollend",a)),this.fire(new c.n("moveend",a))}calculateCameraOptionsFromTo(n,a,h,f=0){const b=c.a7.fromLngLat(n,a),E=c.a7.fromLngLat(h,f),C=E.x-b.x,k=E.y-b.y,O=E.z-b.z,F=Math.hypot(C,k,O);if(F===0)throw new Error("Can't calculate camera options with same From and To");const U=Math.hypot(C,k),$=c.ar(this.transform.cameraToCenterDistance/F/this.transform.tileSize),H=180*Math.atan2(C,-k)/Math.PI;let oe=180*Math.acos(U/F)/Math.PI;return oe=O<0?90-oe:90+oe,{center:E.toLngLat(),elevation:f,zoom:$,pitch:oe,bearing:H}}calculateCameraOptionsFromCameraLngLatAltRotation(n,a,h,f,b){const E=this.transform.calculateCenterFromCameraLngLatAlt(n,a,h,f);return{center:E.center,elevation:E.elevation,zoom:E.zoom,bearing:h,pitch:f,roll:b}}easeTo(n,a){this._stop(!1,n.easeId),"zoom"in(n=c.e({offset:[0,0],duration:500,easing:c.cy},n))&&this._zoomSnap&&(n.zoom=c.cw(n.zoom,this._zoomSnap)),(n.animate===!1||!n.essential&&Z.prefersReducedMotion)&&(n.duration=0);const h=this._getTransformForUpdate(),f=this.getBearing(),b=h.pitch,E=h.roll,C="bearing"in n?this._normalizeBearing(n.bearing,f):f,k="pitch"in n?+n.pitch:b,O="roll"in n?this._normalizeBearing(n.roll,E):E,F="padding"in n?n.padding:h.padding,U=c.P.convert(n.offset);let $,H;n.around&&($=c.W.convert(n.around),H=h.locationToScreenPoint($));const oe={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},de=this.cameraHelper.handleEaseTo(h,{bearing:C,pitch:k,roll:O,padding:F,around:$,aroundPoint:H,offsetAsPoint:U,offset:n.offset,zoom:n.zoom,center:n.center});return this._rotating||(this._rotating=f!==C),this._pitching||(this._pitching=k!==b),this._rolling||(this._rolling=O!==E),this._padding=!h.isPaddingEqual(F),this._zooming||(this._zooming=de.isZooming),this._easeId=n.easeId,this._prepareEase(a,n.noM
vendor: 9,354 bytes, line 1256
1256oveStart,oe),this.terrain&&this._prepareElevation(de.elevationCenter),this._ease(me=>{de.easeFunc(me),this.terrain&&!n.freezeElevation&&this._updateElevation(me),this._applyUpdatedTransform(h),this._fireMoveEvents(a)},me=>{this.terrain&&n.freezeElevation&&this._finalizeElevation(),this._afterEase(a,me)},n),this}_prepareEase(n,a,h={}){this._moving=!0,a||h.moving||this.fire(new c.n("movestart",n)),this._zooming&&!h.zooming&&this.fire(new c.n("zoomstart",n)),this._rotating&&!h.rotating&&this.fire(new c.n("rotatestart",n)),this._pitching&&!h.pitching&&this.fire(new c.n("pitchstart",n)),this._rolling&&!h.rolling&&this.fire(new c.n("rollstart",n))}_prepareElevation(n){this._elevationCenter=n,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(n,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(n){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const a=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(n<1&&a!==this._elevationTarget){const h=this._elevationTarget-this._elevationStart;this._elevationStart+=n*(h-(a-(h*n+this._elevationStart))/(1-n)),this._elevationTarget=a}this.transform.setElevation(c.H.number(this._elevationStart,this._elevationTarget,n))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(n){if(!this.terrain&&n.elevation>=0&&n.pitch<=90)return{};const a=n.getCameraLngLat(),h=n.getCameraAltitude(),f=this.terrain?this.terrain.getElevationForLngLatZoom(a,n.zoom):0;if(h<f){const b=this.calculateCameraOptionsFromTo(a,f,n.center,n.elevation);return{pitch:b.pitch,zoom:b.zoom}}return{}}_applyUpdatedTransform(n){const a=[];if(a.push(f=>this._elevateCameraIfInsideTerrain(f)),this.transformCameraUpdate&&a.push(f=>this.transformCameraUpdate(f)),!a.length)return;const h=n.clone();for(const f of a){const b=h.clone(),{center:E,zoom:C,roll:k,pitch:O,bearing:F,elevation:U}=f(b);E&&b.setCenter(E),U!==void 0&&b.setElevation(U),C!==void 0&&b.setZoom(C),k!==void 0&&b.setRoll(k),O!==void 0&&b.setPitch(O),F!==void 0&&b.setBearing(F),h.apply(b,!1)}this.transform.apply(h,!1)}_fireMoveEvents(n){this.fire(new c.n("move",n)),this._zooming&&this.fire(new c.n("zoom",n)),this._rotating&&this.fire(new c.n("rotate",n)),this._pitching&&this.fire(new c.n("pitch",n)),this._rolling&&this.fire(new c.n("roll",n))}_afterEase(n,a){if(this._easeId&&a&&this._easeId===a)return;delete this._easeId;const h=this._zooming,f=this._rotating,b=this._pitching,E=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,h&&this.fire(new c.n("zoomend",n)),f&&this.fire(new c.n("rotateend",n)),b&&this.fire(new c.n("pitchend",n)),E&&this.fire(new c.n("rollend",n)),this.fire(new c.n("moveend",n))}flyTo(n,a){if(!n.essential&&Z.prefersReducedMotion){const He=c.V(n,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(He,a)}this.stop(),"zoom"in(n=c.e({offset:[0,0],speed:1.2,curve:1.42,easing:c.cy},n))&&this._zoomSnap&&(n.zoom=c.cw(n.zoom,this._zoomSnap));const h=this._getTransformForUpdate(),f=h.bearing,b=h.pitch,E=h.roll,C=h.padding,k="bearing"in n?this._normalizeBearing(n.bearing,f):f,O="pitch"in n?+n.pitch:b,F="roll"in n?this._normalizeBearing(n.roll,E):E,U="padding"in n?n.padding:h.padding,$=c.P.convert(n.offset);let H=h.centerPoint.add($);const oe=h.screenPointToLocation(H),de=this.cameraHelper.handleFlyTo(h,{bearing:k,pitch:O,roll:F,padding:U,locationAtOffset:oe,offsetAsPoint:$,center:n.center,minZoom:n.minZoom,zoom:n.zoom});let me=n.curve;const pe=Math.max(h.width,h.height),ge=pe/de.scaleOfZoom,we=de.pixelPathLength;typeof de.scaleOfMinZoom=="number"&&(me=Math.sqrt(pe/de.scaleOfMinZoom/we*2));const ye=me*me;function fe(He){const pt=(ge*ge-pe*pe+(He?-1:1)*ye*ye*we*we)/(2*(He?ge:pe)*ye*we);return Math.log(Math.sqrt(pt*pt+1)-pt)}function be(He){return(Math.exp(He)-Math.exp(-He))/2}function _e(He){return(Math.exp(He)+Math.exp(-He))/2}const Ie=fe(!1);let je=function(He){return _e(Ie)/_e(Ie+me*He)},Ne=function(He){return pe*((_e(Ie)*(be(pt=Ie+me*He)/_e(pt))-be(Ie))/ye)/we;var pt},Xe=(fe(!0)-Ie)/me;if(Math.abs(we)<2e-6||!isFinite(Xe)){if(Math.abs(pe-ge)<1e-6)return this.easeTo(n,a);const He=ge<pe?-1:1;Xe=Math.abs(Math.log(ge/pe))/me,Ne=()=>0,je=pt=>Math.exp(He*me*pt)}return n.duration="duration"in n?+n.duration:1e3*Xe/("screenSpeed"in n?+n.screenSpeed/me:+n.speed),n.maxDuration&&n.duration>n.maxDuration&&(n.duration=0),this._zooming=!0,this._rotating=f!==k,this._pitching=O!==b,this._rolling=F!==E,this._padding=!h.isPaddingEqual(U),this._prepareEase(a,!1),this.terrain&&this._prepareElevation(de.targetCenter),this._ease(He=>{const pt=He*Xe,rt=1/je(pt),Ge=Ne(pt);this._rotating&&h.setBearing(c.H.number(f,k,He)),this._pitching&&h.setPitch(c.H.number(b,O,He)),this._rolling&&h.setRoll(c.H.number(E,F,He)),this._padding&&(h.interpolatePadding(C,U,He),H=h.centerPoint.add($)),de.easeFunc(He,rt,Ge,H),this.terrain&&!n.freezeElevation&&this._updateElevation(He),this._applyUpdatedTransform(h),this._fireMoveEvents(a)},()=>{this.terrain&&n.freezeElevation&&this._finalizeElevation(),this._afterEase(a)},n),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(n,a){var h;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const f=this._onEaseEnd;delete this._onEaseEnd,f.call(this,a)}return n||(h=this.handlers)===null||h===void 0||h.stop(!1),this}_ease(n,a,h){h.animate===!1||h.duration===0?(n(1),a()):(this._easeStart=Y(),this._easeOptions=h,this._onEaseFrame=n,this._onEaseEnd=a,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(n,a){n=c.X(n,-180,180);const h=Math.abs(n-a);return Math.abs(n-360-a)<h&&(n-=360),Math.abs(n+360-a)<h&&(n+=360),n}queryTerrainElevation(n){return this.terrain?this.terrain.getElevationForLngLat(c.W.convert(n),this.transform):null}}const Td={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class Ei{constructor(n=Td){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=a=>{!a||a.sourceDataType!=="metadata"&&a.sourceDataType!=="visibility"&&a.dataType!=="style"&&a.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=n}getDefaultPosition(){return"bottom-right"}onAdd(n){return this._map=n,this._compact=this.options.compact,this._container=G.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=G.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=G.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(n,a){const h=this._map._getUIString(`AttributionControl.${a}`);n.title=h,n.setAttribute("aria-label",h)}_updateAttributions(){if(!this._map.style)return;let n=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?n=n.concat(this.options.customAttribution.map(f=>typeof f!="string"?"":f)):typeof this.options.customAttribution=="str
1256ing"&&n.push(this.options.customAttribution)),this._map.style.stylesheet){const f=this._map.style.stylesheet;this.styleOwner=f.owner,this.styleId=f.id}const a=this._map.style.tileManagers;for(const f in a){const b=a[f];if(b.used||b.usedForTerrain){const E=b.getSource();E.attribution&&!n.includes(E.attribution)&&n.push(E.attribution)}}n=n.filter(f=>String(f).trim()),n.sort((f,b)=>f.length-b.length),n=n.filter((f,b)=>{for(let E=b+1;E<n.length;E++)if(n[E].includes(f))return!1;return!0});const h=n.join(" | ");h!==this._attribHTML&&(this._attribHTML=h,n.length?(this._innerContainer.innerHTML=G.sanitize(h),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class _f{constructor(n={}){this._updateCompact=()=>{const a=this._container.children;if(a.length){const h=a[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&h.classList.add("maplibregl-compact"):h.classList.remove("maplibregl-compact")}},this.options=n}getDefaultPosition(){return"bottom-left"}onAdd(n){var a;this._map=n,this._compact=(a=this.options)===null||a===void 0?void 0:a.compact,this._container=G.create("div","maplibregl-ctrl");const h=G.create("a","maplibregl-ctrl-logo");return h.target="_blank",h.rel="noopener nofollow",h.href="https://maplibre.org/",h.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),h.setAttribute("rel","noopener nofollow"),this._container.appendChild(h),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class ox{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(n){const a=++this._id;return this._queue.push({callback:n,id:a,cancelled:!1}),a}remove(n){const a=this._currentlyRunning,h=a?this._queue.concat(a):this._queue;for(const f of h)if(f.id===n)return void(f.cancelled=!0)}run(n=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const a=this._currentlyRunning=this._queue;this._queue=[];for(const h of a)if(!h.cancelled&&(h.callback(n),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var sx=c.aS([{name:"a_pos3d",type:"Int16",components:3}]);class ax extends c.E{constructor(n){super(),this._lastTilesetChange=Y(),this.tileManager=n,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=n._source.tileSize*2**this.deltaZoom,n.usedForTerrain=!0,n.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(n,a){this.tileManager.update(n,a),this._renderableTilesKeys=[];const h={};for(const f of Vs(n,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:a,calculateTileZoom:this.tileManager._source.calculateTileZoom}))h[f.key]=!0,this._renderableTilesKeys.push(f.key),this._tiles[f.key]||(f.terrainRttPosMatrix32f=new Float64Array(16),c.c7(f.terrainRttPosMatrix32f,0,c.a6,c.a6,0,0,1),this._tiles[f.key]=new Va(f,this.tileSize),this._lastTilesetChange=Y());for(const f in this._tiles)h[f]||delete this._tiles[f]}freeRtt(n){for(const a in this._tiles){const h=this._tiles[a];(!n||h.tileID.equals(n)||h.tileID.isChildOf(n)||n.isChildOf(h.tileID))&&(h.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(n=>this.getTileByID(n))}getTileByID(n){return this._tiles[n]}getTerrainCoords(n,a){return a?this._getTerrainCoordsForTileRanges(n,a):this._getTerrainCoordsForRegularTile(n)}_getTerrainCoordsForRegularTile(n){const a={};for(const h of this._renderableTilesKeys){const f=this._tiles[h].tileID,b=n.clone(),E=c.bj();if(f.canonical.equals(n.canonical))c.c7(E,0,c.a6,c.a6,0,0,1);else if(f.canonical.isChildOf(n.canonical)){const C=f.canonical.z-n.canonical.z,k=f.canonical.x-(f.canonical.x>>C<<C),O=f.canonical.y-(f.canonical.y>>C<<C),F=c.a6>>C;c.c7(E,0,F,F,0,0,1),c.Q(E,E,[-k*F,-O*F,0])}else{if(!n.canonical.isChildOf(f.canonical))continue;
1256{const C=n.canonical.z-f.canonical.z,k=n.canonical.x-(n.canonical.x>>C<<C),O=n.canonical.y-(n.canonical.y>>C<<C),F=c.a6>>C;c.c7(E,0,c.a6,c.a6,0,0,1),c.Q(E,E,[k*F,O*F,0]),c.S(E,E,[1/2**C,1/2**C,0])}}b.terrainRttPosMatrix32f=new Float32Array(E),a[h]=b}return a}_getTerrainCoordsForTileRanges(n,a){const h={};for(const f of this._renderableTilesKeys){const b=this._tiles[f].tileID;if(!this._isWithinTileRanges(b,a))continue;const E=n.clone(),C=c.bj();if(b.canonical.z===n.canonical.z){const k=n.canonical.x-b.canonical.x+n.wrap*(1<<n.canonical.z),O=n.canonical.y-b.canonical.y;c.c7(C,0,c.a6,c.a6,0,0,1),c.Q(C,C,[k*c.a6,O*c.a6,0])}else if(b.canonical.z>n.canonical.z){const k=b.canonical.z-n.canonical.z,O=b.canonical.x-(b.canonical.x>>k<<k)+n.wrap*(1<<b.canonical.z),F=b.canonical.y-(b.canonical.y>>k<<k),U=n.canonical.x-(b.canonical.x>>k),$=n.canonical.y-(b.canonical.y>>k),H=c.a6>>k;c.c7(C,0,H,H,0,0,1),c.Q(C,C,[-O*H+U*c.a6,-F*H+$*c.a6,0])}else{const k=n.canonical.z-b.canonical.z,O=n.canonical.x-(n.canonical.x>>k<<k)+n.wrap*(1<<n.canonical.z),F=n.canonical.y-(n.canonical.y>>k<<k),U=(n.canonical.x>>k)-b.canonical.x,$=(n.canonical.y>>k)-b.canonical.y,H=c.a6<<k;c.c7(C,0,H,H,0,0,1),c.Q(C,C,[O*c.a6+U*H,F*c.a6+$*H,0])}E.terrainRttPosMatrix32f=new Float32Array(C),h[f]=E}return h}getSourceTile(n,a){var h,f;const b=this.tileManager._source;let E=n.overscaledZ-this.deltaZoom;if(E>b.maxzoom&&(E=b.maxzoom),E<b.minzoom)return;(h=this._sourceTileCache)[f=n.key]||(h[f]=n.scaledTo(E).key);let C=this.findTileInCaches(this._sourceTileCache[n.key]);if(!(C!=null&&C.dem)&&a)for(;E>=b.minzoom&&!(C!=null&&C.dem);)C=this.findTileInCaches(n.scaledTo(E--).key);return C}findTileInCaches(n){let a=this.tileManager.getTileByID(n);return a||(a=this.tileManager._outOfViewCache.getByKey(n),a)}anyTilesAfterTime(n=Date.now()){return this._lastTilesetChange>=n}_isWithinTileRanges(n,a){const h=a[n.canonical.z];return!!h&&(n.wrap>h.minWrap||n.wrap<h.maxWrap||n.canonical.x>=h.minTileXWrapped&&n.canonical.x<=h.maxTileXWrapped&&n.canonical.y>=h.minTileY&&n.canonical.y<=h.maxTileY)}}class Wc{constructor(n,a,h){this._meshCache={},this.painter=n,this.tileManager=new ax(a),this.options=h,this.exaggeration=typeof h.exaggeration=="number"?h.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(const n in this._meshCache)this._meshCache[n].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(n,a,h,f=c.a6){var b;const E=n.normalizeCoordinates(a,h,f);if(!E)return 0;const C=this.getTerrainData(E.tileID),k=(b=C.tile)===null||b===void 0?void 0:b.dem;if(!k)return 0;const O=c.cC([],[E.x/f*c.a6,E.y/f*c.a6],C.u_terrain_matrix),F=[O[0]*k.dim,O[1]*k.dim],U=Math.floor(F[0]),$=Math.floor(F[1]),H=F[0]-U,oe=F[1]-$;return k.get(U,$)*(1-H)*(1-oe)+k.get(U+1,$)*H*(1-oe)+k.get(U,$+1)*(1-H)*oe+k.get(U+1,$+1)*H*oe}getElevationForLngLatZoom(n,a){if(!c.cD(a,n.wrap()))return 0;const{tileID:h,mercatorX:f,mercatorY:b}=this._getOverscaledTileIDFromLngLatZoom(n,a);return this.getElevation(h,f%c.a6,b%c.a6,c.a6)}getElevationForLngLat(n,a){const h=Vs(a,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this});let f=0;for(const b of h)b.canonical.z>f&&(f=Math.min(b.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(n,f)}getElevation(n,a,h,f=c.a6){return this.getDEMElevation(n,a,h,f)*this.exaggeration}getTerrainData(n){var a,h;if(!this._emptyDemTexture){const E=this.painter.context,C=new c.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new c.T(E,C,E.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new c.T(E,new c.R({width:1,height:1}),E.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(E.gl.NEAREST,E.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=c.ap([])}const f=this.tileManager.getSourceTile(n,!0);if(f!=null&&f.dem&&(!f.demTexture||f.needsTerrainPrepare)){const E=this.painter.context;f.demTexture=this.painter.getTileTexture(f.dem.stride),f.demTexture?f.demTexture.update(f.dem.getPixels(),{premultiply:!1}):f.demTexture=new c.T(E,f.dem.getPixels(),E.gl.RGBA,{premultiply:!1}),f.demTexture.bind(E.gl.NEAREST,E.gl.CLAMP_TO_EDGE),f.needsTerrainPrepare=!1}const b=f&&f.toString()+f.tileID.key+n.key;if(b&&!this._demMatrixCache[b]){const E=this.tileManager.getSource().maxzoom;let C=n.canonical.z-f.tileID.canonical.z;n.overscaledZ>n.canonical.z&&(n.canonical.z>=E?C=n.canonical.z-E:c.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const k=n.canonical.x-(n.canonical.x>>C<<C),O=n.canonical.y-(n.canonical.y>>C<<C),F=c.cE(new Float64Array(16),[1/(c.a6<<C),1/(c.a6<<C),0]);c.Q(F,F,[k*c.a6,O*c.a6,0]),this._demMatrixCache[b]={matrix:F,coord:n}}return{u_depth:2,u_terrain:3,u_terrain_dim:((a=f==null?void 0:f.dem)===null||a===void 0?void 0:a.dim)||1,u_terrain_matrix:b?this._demMatrixCache[b].matrix:this._emptyDemMatrix,u_terrain_unpack:((h=f==null?void 0:f.dem)===null||h===void 0?void 0:h.getUnpackVector())||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:((f==null?void 0:f.demTexture)||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:f}}getFramebuffer(n){const a=this.painter,h=a.width/devicePixelRatio,f=a.height/devicePixelRatio;return!this._fbo||this._fbo.width===h&&this._fbo.height===f||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new c.T(a.context,{width:h,height:f,data:null},a.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(a.context.gl.NEAREST,a.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new c.T(a.context,{width:h,height:f,data:null},a.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(a.context.gl.NEAREST,a.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=a.context.createFramebuffer(h,f,!0,!1),this._fbo.depthAttachment.set(a.context.createRenderbuffer(a.context.gl.DEPTH_COMPONENT16,h,f))),this._fbo.colorAttachment.set(n==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const n=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const a=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let b=0,E=0;b<this._coordsTextureSize;b++)for(let C=0;C<this._coordsTextureSize;C++,E+=4)a[E+0]=255&C,a[E+1]=255&b,a[E+2]=C>>8<<4|b>>8,a[E+3]=0;const h=new c.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(a.buffer)),f=new c.T(n,h,n.gl.RGBA,{premultiply:!1});return f.bind(n.gl.NEAREST,n.gl.CLAMP_TO_EDGE),this._coordsTexture=f,f}pointCoordinate(n){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();
vendor: 4,909 bytes, line 1256
1256const a=new Uint8Array(4),h=this.painter.context,f=h.gl,b=Math.round(n.x*this.painter.pixelRatio/devicePixelRatio),E=Math.round(n.y*this.painter.pixelRatio/devicePixelRatio),C=Math.round(this.painter.height/devicePixelRatio);h.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),f.readPixels(b,C-E-1,1,1,f.RGBA,f.UNSIGNED_BYTE,a),h.bindFramebuffer.set(null);const k=a[0]+(a[2]>>4<<8),O=a[1]+((15&a[2])<<8),F=this.coordsIndex[255-a[3]],U=F&&this.tileManager.getTileByID(F);if(!U)return null;const $=this._coordsTextureSize,H=(1<<U.tileID.canonical.z)*$;return new c.a7((U.tileID.canonical.x*$+k)/H+U.tileID.wrap,(U.tileID.canonical.y*$+O)/H,this.getElevation(U.tileID,k,O,$))}depthAtPoint(n){const a=new Uint8Array(4),h=this.painter.context,f=h.gl;return h.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),f.readPixels(n.x,this.painter.height/devicePixelRatio-n.y-1,1,1,f.RGBA,f.UNSIGNED_BYTE,a),h.bindFramebuffer.set(null),(a[0]/16777216+a[1]/65536+a[2]/256+a[3])/256}getTerrainMesh(n){var a;const h=((a=this.painter.style.projection)===null||a===void 0?void 0:a.transitionState)>0,f=h&&n.canonical.y===0,b=h&&n.canonical.y===(1<<n.canonical.z)-1,E=`m_${f?"n":""}_${b?"s":""}`;if(this._meshCache[E])return this._meshCache[E];const C=this.painter.context,k=new c.cF,O=new c.aW,F=this.meshSize,U=c.a6/F,$=F*F;for(let _e=0;_e<=F;_e++)for(let Ie=0;Ie<=F;Ie++)k.emplaceBack(Ie*U,_e*U,0);for(let _e=0;_e<$;_e+=F+1)for(let Ie=0;Ie<F;Ie++)O.emplaceBack(Ie+_e,F+Ie+_e+1,F+Ie+_e+2),O.emplaceBack(Ie+_e,F+Ie+_e+2,Ie+_e+1);const H=k.length,oe=H+(F+1),de=(F+1)*F,me=f?c.bq:0,pe=f?0:1,ge=b?c.br:c.a6,we=b?0:1;for(let _e=0;_e<=F;_e++)k.emplaceBack(_e*U,me,pe);for(let _e=0;_e<=F;_e++)k.emplaceBack(_e*U,ge,we);for(let _e=0;_e<F;_e++)O.emplaceBack(de+_e,oe+_e,oe+_e+1),O.emplaceBack(de+_e,oe+_e+1,de+_e+1),O.emplaceBack(0+_e,H+_e+1,H+_e),O.emplaceBack(0+_e,0+_e+1,H+_e+1);const ye=k.length,fe=ye+2*(F+1);for(const _e of[0,1])for(let Ie=0;Ie<=F;Ie++)for(const je of[0,1])k.emplaceBack(_e*c.a6,Ie*U,je);for(let _e=0;_e<2*F;_e+=2)O.emplaceBack(ye+_e,ye+_e+1,ye+_e+3),O.emplaceBack(ye+_e,ye+_e+3,ye+_e+2),O.emplaceBack(fe+_e,fe+_e+3,fe+_e+1),O.emplaceBack(fe+_e,fe+_e+2,fe+_e+3);const be=new nr(C.createVertexBuffer(k,sx.members),C.createIndexBuffer(O),c.aV.simpleSegment(0,0,k.length,O.length));return this._meshCache[E]=be,be}getMeshFrameDelta(n){return 2*Math.PI*c.bD/Math.pow(2,Math.max(n,0))/5}getMinTileElevationForLngLatZoom(n,a){var h;if(!c.cD(a,n.wrap()))return 0;const{tileID:f}=this._getOverscaledTileIDFromLngLatZoom(n,a);return(h=this.getMinMaxElevation(f).minElevation)!==null&&h!==void 0?h:0}getMinMaxElevation(n){const a=this.getTerrainData(n).tile,h={minElevation:null,maxElevation:null};return a!=null&&a.dem&&(h.minElevation=a.dem.min*this.exaggeration,h.maxElevation=a.dem.max*this.exaggeration),h}_getOverscaledTileIDFromLngLatZoom(n,a){const h=c.a7.fromLngLat(n.wrap()),f=(1<<a)*c.a6,b=h.x*f,E=h.y*f,C=Math.floor(b/c.a6),k=Math.floor(E/c.a6);return{tileID:new c.a3(a,0,a,C,k),mercatorX:b,mercatorY:E}}}class yr{constructor(n,a,h){this._context=n,this._size=a,this._tileSize=h,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const n of this._objects)n.texture.destroy(),n.fbo.destroy()}_createObject(n){const a=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),h=new c.T(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return h.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),a.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),a.colorAttachment.set(h.texture),{id:n,fbo:a,texture:h,stamp:-1,inUse:!1}}getObjectForId(n){return this._objects[n]}useObject(n){n.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(a=>n.id!==a),this._recentlyUsed.push(n.id)}stampObject(n){n.stamp=++this._stamp}getOrCreateFreeObject(){for(const a of this._recentlyUsed)if(!this._objects[a].inUse)return this._objects[a];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const n=this._createObject(this._objects.length);return this._objects.push(n),n}freeObject(n){n.inUse=!1}freeAllObjects(){for(const n of this._objects)this.freeObject(n)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(n=>!n.inUse)===!1}}const ar={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Py{constructor(n,a){this.painter=n,this.terrain=a,this.pool=new yr(n.context,30,a.tileManager.tileSize*a.qualityFactor)}destruct(){this.pool.destruct()}getTexture(n){return this.pool.getObjectForId(n.rtt[this._stacks.length-1].id).texture}
1256prepareForRender(n,a){var h,f,b;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=n._order.filter(E=>!n._layers[E].isHidden(a)),this._coordsAscending={};for(const E in n.tileManagers){this._coordsAscending[E]={};const C=n.tileManagers[E].getVisibleCoordinates(),k=n.tileManagers[E].getSource(),O=k instanceof is?k.terrainTileRanges:null;for(const F of C){const U=this.terrain.tileManager.getTerrainCoords(F,O);for(const $ in U)(b=this._coordsAscending[E])[$]||(b[$]=[]),this._coordsAscending[E][$].push(U[$])}}this._rttFingerprints={};for(const E of n._order){const C=n._layers[E],k=C.source;if(ar[C.type]&&!this._rttFingerprints[k]){this._rttFingerprints[k]={};const O=(f=(h=n.tileManagers[k])===null||h===void 0?void 0:h.getState().revision)!==null&&f!==void 0?f:0;for(const F in this._coordsAscending[k])this._rttFingerprints[k][F]=`${this._coordsAscending[k][F].map(U=>U.key).sort().join()}#${O}`}}for(const E of this._renderableTiles)for(const C in this._rttFingerprints){const k=this._rttFingerprints[C][E.tileID.key];k&&k!==E.rttFingerprint[C]&&(E.rtt=[])}}renderLayer(n,a){if(n.isHidden(this.painter.transform.zoom))return!1;const h=Object.assign(Object.assign({},a),{isRenderingToTexture:!0}),f=n.type,b=this.painter,E=this._renderableLayerIds[this._renderableLayerIds.length-1]===n.id;if(ar[f]&&(this._prevType&&ar[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(n.id),!E))return!0;if(ar[this._prevType]||ar[f]&&E){this._prevType=f;const C=this._stacks.length-1,k=this._stacks[C]||[];for(const O of this._renderableTiles){if(this.pool.isFull()&&(sf(this.painter,this.terrain,this._rttTiles,h),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(O),O.rtt[C]){const U=this.pool.getObjectForId(O.rtt[C].id);if(U.stamp===O.rtt[C].stamp){this.pool.useObject(U);continue}}const F=this.pool.getOrCreateFreeObject();this.pool.useObject(F),this.pool.stampObject(F),O.rtt[C]={id:F.id,stamp:F.stamp},b.context.bindFramebuffer.set(F.fbo.framebuffer),b.context.clear({color:c.bo.transparent,stencil:0}),b.currentStencilSource=void 0;for(const U of k){const $=b.style._layers[U],H=$.source?this._coordsAscending[$.source][O.tileID.key]:[O.tileID];b.context.viewport.set([0,0,F.fbo.width,F.fbo.height]),b._renderTileClippingMasks($,H,!0),b.renderLayer(b,b.style.tileManagers[$.source],$,H,h),$.source&&(O.rttFingerprint[$.source]=this._rttFingerprints[$.source][O.tileID.key])}}return sf(this.painter,this.terrain,this._rttTiles,h),this._rttTiles=[],this.pool.freeAllObjects(),ar[f]}return!1}}const Zc={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Ed=A,Pd={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:Td,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileC
1256acheSize:null,maxTileCacheZoomLevels:c.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20};let Cd=class extends Ey{get _ownerWindow(){var _,n;return((n=(_=this._container)===null||_===void 0?void 0:_.ownerDocument)===null||n===void 0?void 0:n.defaultView)||window}constructor(_){var n,a,h;const f=Object.assign(Object.assign(Object.assign({},Pd),_),{canvasContextAttributes:Object.assign(Object.assign({},Pd.canvasContextAttributes),_.canvasContextAttributes)});if(f.minZoom!=null&&f.maxZoom!=null&&f.minZoom>f.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(f.minPitch!=null&&f.maxPitch!=null&&f.minPitch>f.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(f.minPitch!=null&&f.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(f.maxPitch!=null&&f.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const b=new Ws,E=new Zs;f.minZoom!==void 0&&b.setMinZoom(f.minZoom),f.maxZoom!==void 0&&b.setMaxZoom(f.maxZoom),f.minPitch!==void 0&&b.setMinPitch(f.minPitch),f.maxPitch!==void 0&&b.setMaxPitch(f.maxPitch),f.renderWorldCopies!==void 0&&b.setRenderWorldCopies(f.renderWorldCopies),f.transformConstrain!==null&&b.setConstrainOverride(f.transformConstrain),super(b,E,{bearingSnap:f.bearingSnap,zoomSnap:f.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new ox,this._controls=[],this._mapId=c.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=k=>{if(k.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(const O of Object.values(this.style._layers))if(O.type==="custom"&&console.warn(`Custom layer with id '${O.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),O._listeners)for(const[F]of Object.entries(O._listeners))console.warn(`Custom layer with id '${O.id}' had event listeners for event '${F}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new c.n("webglcontextlost",{originalEvent:k}))}else this.fire(new c.n("webglcontextlost",{originalEvent:k}))},this._contextRestored=k=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new c.n("webglcontextrestored",{originalEvent:k}))},this._onMapScroll=k=>{if(k.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=f.interactive,this._maxTileCacheSize=f.maxTileCacheSize,this._maxTileCacheZoomLevels=f.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},f.canvasContextAttributes),this._trackResize=f.trackResize===!0,this._bearingSnap=f.bearingSnap,this._zoomSnap=f.zoomSnap,this._centerClampedToGround=f.centerClampedToGround,this._refreshExpiredTiles=f.refreshExpiredTiles===!0,this._fadeDuration=f.fadeDuration,this._crossSourceCollisions=f.crossSourceCollisions===!0,this._collectResourceTiming=f.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Zc),f.locale),this._clickTolerance=f.clickTolerance,this._overridePixelRatio=f.pixelRatio,this._maxCanvasSize=f.maxCanvasSize,this._zoomLevelsToOverscale=f.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=f.transformCameraUpdate,this.transformConstrain=f.transformConstrain,this.cancelPendingTileRequestsWhileZooming=f.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(f.anisotropicFilterPitch),f.reduceMotion!==void 0&&(Z.prefersReducedMotion=f.reduceMotion),this._imageQueueHandle=Q.addThrottleControl(()=>this.isMoving()),this._requestManager=new J(f.transformRequest),this._container=this._resolveContainer(f.container),f.maxBounds&&this.setMaxBounds(f.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Fn(this,f),this._hash=f.hash?new Nc(typeof f.hash=="string"&&f.hash||void 0).addTo(this):void 0,!((n=this._hash)===null||n===void 0)&&n._onHashChange()||(this.jumpTo({center:f.center,elevation:f.elevation,zoom:f.zoom,bearing:f.bearing,pitch:f.pitch,roll:f.roll}),f.bounds&&(this.resize(),this.fitBounds(f.bounds,c.e({},f.fitBoundsOptions,{duration:0}))));const C=typeof f.style=="string"||((h=(a=f.style)===null||a===void 0?void 0:a.projection)===null||h===void 0?void 0:h.type)!=="globe";this.resize(null,C),this._localIdeographFontFamily=f.localIdeographFontFamily,this._val
1256idateStyle=f.validateStyle,f.style&&this.setStyle(f.style,{localIdeographFontFamily:f.localIdeographFontFamily}),f.attributionControl&&this.addControl(new Ei(typeof f.attributionControl=="boolean"?void 0:f.attributionControl)),f.maplibreLogo&&this.addControl(new _f,f.logoPosition),this.on("style.load",()=>{if(C||this._resizeTransform(),this.transform.unmodified){const k=c.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(k)}}),this.on("data",k=>{this._update(k.dataType==="style"),this.fire(new c.n(`${k.dataType}data`,k))}),this.on("dataloading",k=>{this.fire(new c.n(`${k.dataType}dataloading`,k))}),this.on("dataabort",k=>{this.fire(new c.n("sourcedataabort",k))})}_getMapId(){return this._mapId}setGlobalStateProperty(_,n){return this.style.setGlobalStateProperty(_,n),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(_,n){if(n===void 0&&(n=_.getDefaultPosition?_.getDefaultPosition():"top-right"),!(_!=null&&_.onAdd))return this.fire(new c.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const a=_.onAdd(this);this._controls.push(_);const h=this._controlPositions[n];return n.includes("bottom")?h.insertBefore(a,h.firstChild):h.appendChild(a),this}removeControl(_){if(!(_!=null&&_.onRemove))return this.fire(new c.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(_);return n>-1&&this._controls.splice(n,1),_.onRemove(this),this}hasControl(_){return this._controls.includes(_)}coveringTiles(_){return Vs(this.transform,_)}calculateCameraOptionsFromTo(_,n,a,h){return h==null&&this.terrain&&(h=this.terrain.getElevationForLngLat(a,this.transform)),super.calculateCameraOptionsFromTo(_,n,a,h)}resize(_,n=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(n);const a=!this._moving;return a&&(this.stop(),this.fire(new c.n("movestart",_)).fire(new c.n("move",_))),this.fire(new c.n("resize",_)),a&&this.fire(new c.n("moveend",_)),this}_resizeInternal(_=!0){const[n,a]=this._containerDimensions(),h=this._getClampedPixelRatio(n,a);if(this._resizeCanvas(n,a,h),this.painter.resize(n,a,h),this.painter.overLimit()){const f=this.painter.context.gl;this._maxCanvasSize=[f.drawingBufferWidth,f.drawingBufferHeight];const b=this._getClampedPixelRatio(n,a);this._resizeCanvas(n,a,b),this.painter.resize(n,a,b)}this._resizeTransform(_)}_resizeTransform(_=!0){var n;const[a,h]=this._containerDimensions();this.transform.resize(a,h,_),(n=this._requestedCameraState)===null||n===void 0||n.resize(a,h,_)}_getClampedPixelRatio(_,n){const{0:a,1:h}=this._maxCanvasSize,f=this.getPixelRatio(),b=_*f,E=n*f;return Math.min(b>a?a/b:1,E>h?h/E:1)*f}getPixelRatio(){var _;return(_=this._overridePixelRatio)!==null&&_!==void 0?_:devicePixelRatio}setPixelRatio(_){this._overridePixelRatio=_,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(_){return this.transform.setMaxBounds(bt.convert(_)),this._update()}setMinZoom(_){if((_=_??-2)>=-2&&_<=this.transform.maxZoom){const n=this.transform.zoom,a=this._getTransformForUpdate();return a.setMinZoom(_),this._applyUpdatedTransform(a),this._update(),n!==this.transform.zoom&&this.fire(new c.n("zoomstart")).fire(new c.n("zoom")).fire(new c.n("zoomend")).fire(new c.n("movestart")).fire(new c.n("move")).fire(new c.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(_){if((_=_??22)>=this.transform.minZoom){const n=this.transform.zoom,a=this._getTransformForUpdate();return a.setMaxZoom(_),this._applyUpdatedTransform(a),this._update(),n!==this.transform.zoom&&this.fire(new c.n("zoomstart")).fire(new c.n("zoom")).fire(new c.n("zoomend")).fire(new c.n("movestart")).fire(new c.n("move")).fire(new c.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(_){if((_=_??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(_>=0&&_<=this.transform.maxPitch){const n=this.transform.pitch,a=this._getTransformForUpdate();return a.setMinPitch(_),this._applyUpdatedTransform(a),this._update(),n!==this.transform.pitch&&this.fire(new c.n("pitchstart")).fire(new c.n("pitch")).fire(new c.n("pitchend")).fire(new c.n("movestart")).fire(new c.n("move")).fire(new c.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(_){if((_=_??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(_>=this.transform.minPitch){const n=this.transform.pitch,a=this._getTransformForUpdate();return a.setMaxPitch(_),this._applyUpdatedTransform(a),this._update(),n!==this.transform.pitch&&this.fire(new c.n("pitchstart")).fire(new c.n("pitch")).fire(new c.n("pitchend")).fire(new c.n("movestart")).fire(new c.n("move")).fire(new c.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(_){if((_=_??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(_<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=_,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(_){return this.transform.setRenderWorldCopies(_),this._update()}setTransformConstrain(_){return this.transform.setConstrainOverride(_),this._update()}project(_){return this.transform.locationToScreenPoint(c.W.convert(_),this.style&&this.terrain)}unproject(_){return this.transform.screenPointToLocation(c.P.convert(_),this.terrain)}isMoving(){var _;return this._moving||((_=this.handlers)===null||_===void 0?void 0:_.isMoving())}isZooming(){var _;return this._zooming||((_=this.handlers)===null||_===void 0?void 0:_.isZooming())}isRotating(){var _;return this._rotating||((_=this.handlers)===null||_===void 0?void 0:_.isRotating())}_createDelegatedListener(_,n,a){if(_==="mouseenter"||_==="mouseover"){let h=!1;return{layers:n,listener:a,delegates:{mousemove:b=>{const E=n.filter(k=>this.getLayer(k)),C=E.length!==0?this.queryRenderedFeatures(b.point,{layers:E}
1256):[];C.length?h||(h=!0,a.call(this,new ci(_,this,b.originalEvent,{features:C}))):h=!1},mouseout:()=>{h=!1}}}}if(_==="mouseleave"||_==="mouseout"){let h=!1;return{layers:n,listener:a,delegates:{mousemove:E=>{const C=n.filter(k=>this.getLayer(k));(C.length!==0?this.queryRenderedFeatures(E.point,{layers:C}):[]).length?h=!0:h&&(h=!1,a.call(this,new ci(_,this,E.originalEvent)))},mouseout:E=>{h&&(h=!1,a.call(this,new ci(_,this,E.originalEvent)))}}}}{const h=f=>{const b=n.filter(C=>this.getLayer(C)),E=b.length!==0?this.queryRenderedFeatures(f.point,{layers:b}):[];E.length&&(f.features=E,a.call(this,f),delete f.features)};return{layers:n,listener:a,delegates:{[_]:h}}}}_saveDelegatedListener(_,n){var a;this._delegatedListeners||(this._delegatedListeners={}),(a=this._delegatedListeners)[_]||(a[_]=[]),this._delegatedListeners[_].push(n)}_removeDelegatedListener(_,n,a){var h;if(!(!((h=this._delegatedListeners)===null||h===void 0)&&h[_]))return;const f=this._delegatedListeners[_];for(let b=0;b<f.length;b++){const E=f[b];if(E.listener===a&&E.layers.length===n.length&&E.layers.every(C=>n.includes(C))){for(const C in E.delegates)this.off(C,E.delegates[C]);return void f.splice(b,1)}}}on(_,n,a){if(a===void 0)return super.on(_,n);const h=typeof n=="string"?[n]:n,f=this._createDelegatedListener(_,h,a);this._saveDelegatedListener(_,f);for(const b in f.delegates)this.on(b,f.delegates[b]);return{unsubscribe:()=>{this._removeDelegatedListener(_,h,a)}}}once(_,n,a){if(a===void 0)return super.once(_,n);const h=typeof n=="string"?[n]:n,f=this._createDelegatedListener(_,h,a);for(const b in f.delegates){const E=f.delegates[b];f.delegates[b]=(...C)=>{this._removeDelegatedListener(_,h,a),E(...C)}}this._saveDelegatedListener(_,f);for(const b in f.delegates)this.once(b,f.delegates[b]);return this}off(_,n,a){return a===void 0?super.off(_,n):(this._removeDelegatedListener(_,typeof n=="string"?[n]:n,a),this)}queryRenderedFeatures(_,n){if(!this.style)return[];let a;const h=_ instanceof c.P||Array.isArray(_),f=h?_:[[0,0],[this.transform.width,this.transform.height]];if(n||(n=(h?{}:_)||{}),f instanceof c.P||typeof f[0]=="number")a=[c.P.convert(f)];else{const b=c.P.convert(f[0]),E=c.P.convert(f[1]);a=[b,new c.P(E.x,b.y),E,new c.P(b.x,E.y),b]}return this.style.queryRenderedFeatures(a,n,this.transform)}querySourceFeatures(_,n){return this.style.querySourceFeatures(_,n)}setStyle(_,n){return(n=c.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._val
1256idateStyle},n)).diff!==!1&&n.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&_?(this._diffStyle(_,n),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._updateStyle(_,n))}setTransformRequest(_){return this._requestManager.setTransformRequest(_),this}_getUIString(_){const n=this._locale[_];if(n==null)throw new Error(`Missing UI string '${_}'`);return n}_updateStyle(_,n){var a,h,f;if((a=this._diffStyleRequest)===null||a===void 0||a.abort(),this._diffStyleRequest=null,n.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(_,n));const b=this.style&&n.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!_)),_?(this.style=new Ys(this,n||{}),this.style.setEventedParent(this,{style:this.style}),typeof _=="string"?this.style.loadURL(_,n,b):this.style.loadJSON(_,n,b),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(f=(h=this.style)===null||h===void 0?void 0:h.projection)===null||f===void 0||f.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ys(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(_,n){return c._(this,void 0,void 0,function*(){var a;if((a=this._diffStyleRequest)===null||a===void 0||a.abort(),typeof _=="string"){const h=_;this._diffStyleRequest=new AbortController;const f=this._diffStyleRequest;try{const b=yield this._requestManager.transformRequest(h,"Style");if(f.signal.aborted)return void(this._diffStyleRequest=null);const E=yield c.k(b,f);this._diffStyleRequest=null,this._updateDiff(E.data,n)}catch(b){this._diffStyleRequest=null,c.$(b)||this.fire(new c.l(c.d(b)))}}else typeof _=="object"&&(this._diffStyleRequest=null,this._updateDiff(_,n))})}_updateDiff(_,n){try{this.style.setState(_,n)&&this._update(!0)}catch(a){c.w(`Unable to perform style diff: ${c.d(a).message}.  Rebuilding the style from scratch.`),this._updateStyle(_,n)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();c.w("There is no style added to the map.")}addSource(_,n){return this._lazyInitEmptyStyle(),this.style.addSource(_,n),this._update(!0)}isSourceLoaded(_){var n;const a=(n=this.style)===null||n===void 0?void 0:n.tileManagers[_];if(a!==void 0)return a.loaded();this.fire(new c.l(new Error(`There is no tile manager with ID '${_}'`)))}setTerrain(_){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),_){const n=this.style.tileManagers[_.source];if(!n)throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);this.terrain===null&&n.reload();for(const a in this.style._layers){const h=this.style._layers[a];h.type==="hillshade"&&h.source===_.source&&c.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),h.type==="color-relief"&&h.source===_.source&&c.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Wc(this.painter,n,_),this.painter.renderToTexture=new Py(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=a=>{var h;a.dataType==="style"?this.terrain.tileManager.freeRtt():a.dataType==="source"&&a.tile&&(a.sourceId!==_.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((h=a.source)===null||h===void 0?void 0:h.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(a.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGroun
1256d&&this.transform.setElevation(0);return this.fire(new c.n("terrain",{terrain:_})),this}getTerrain(){var _,n;return(n=(_=this.terrain)===null||_===void 0?void 0:_.options)!==null&&n!==void 0?n:null}areTilesLoaded(){var _;const n=(_=this.style)===null||_===void 0?void 0:_.tileManagers;for(const a of Object.values(n))if(!a.areTilesLoaded())return!1;return!0}removeSource(_){return this.style.removeSource(_),this._update(!0)}getSource(_){return this.style.getSource(_)}setSourceTileLodParams(_,n,a){if(a){const h=this.getSource(a);if(!h)throw new Error(`There is no source with ID "${a}", cannot set LOD parameters`);h.calculateTileZoom=Pp(Math.max(1,_),Math.max(1,n))}else for(const h in this.style.tileManagers)this.style.tileManagers[h].getSource().calculateTileZoom=Pp(Math.max(1,_),Math.max(1,n));return this._update(!0),this}refreshTiles(_,n){const a=this.style.tileManagers[_];if(!a)throw new Error(`There is no tile manager with ID "${_}", cannot refresh tile`);n===void 0?a.reload(!0):a.refreshTiles(n.map(h=>new c.aa(h.z,h.x,h.y)))}addImage(_,n,a={}){const{pixelRatio:h=1,sdf:f=!1,stretchX:b,stretchY:E,content:C,textFitWidth:k,textFitHeight:O}=a;if(this._lazyInitEmptyStyle(),!(n instanceof HTMLImageElement||c.b(n))){if(n.width===void 0||n.height===void 0)return this.fire(new c.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:F,height:U,data:$}=n,H=n;return this.style.addImage(_,{data:new c.R({width:F,height:U},new Uint8Array($)),pixelRatio:h,stretchX:b,stretchY:E,content:C,textFitWidth:k,textFitHeight:O,sdf:f,version:0,userImage:H}),H.onAdd&&H.onAdd(this,_),this}}{const{width:F,height:U,data:$}=Z.getImageData(n);this.style.addImage(_,{data:new c.R({width:F,height:U},$),pixelRatio:h,stretchX:b,stretchY:E,content:C,textFitWidth:k,textFitHeight:O,sdf:f,version:0})}}updateImage(_,n){const a=this.style.getImage(_);if(!a)return this.fire(new c.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const h=n instanceof HTMLImageElement||c.b(n)?Z.getImageData(n):n,{width:f,height:b,data:E}=h;if(f===void 0||b===void 0)return this.fire(new c.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(f!==a.data.width||b!==a.data.height)return this.fire(new c.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));const C=!(n instanceof HTMLImageElement||c.b(n));return a.data.replace(E,C),this.style.updateImage(_,a),this}getImage(_){return this.style.getImage(_)}hasImage(_){return _?!!this.style.getImage(_):(this.fire(new c.l(new Error("Missing required image id"))),!1)}removeImage(_){this.style.removeImage(_)}loadImage(_){return c._(this,void 0,void 0,function*(){return Q.getImage(yield this._requestManager.transformRequest(_,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(_,n){return this._lazyInitEmptyStyle(),this.style.addLayer(_,n),this._update(!0)}moveLayer(_,n){return this.style.moveLayer(_,n),this._update(!0)}removeLayer(_){return this.style.removeLayer(_),this._update(!0)}getLayer(_){return this.style.getLayer(_)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(_,n,a){return this.style.setLayerZoomRange(_,n,a),this._update(!0)}setFilter(_,n,a={}){return this.style.setFilter(_,n,a),this._update(!0)}getFilter(_){return this.style.getFilter(_)}setPaintProperty(_,n,a,h={}){return this.style.setPaintProperty(_,n,a,h),this._update(!0)}getPaintProperty(_,n){return this.style.getPaintProperty(_,n)}setLayoutProperty(_,n,a,h={}){return this.style.setLayoutProperty(_,n,a,h),this._update(!0)}getLayoutProperty(_,n){return this.style.getLayoutProperty(_,n)}setGlyphs(_,n={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(_,n),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(_,n,a={}){return this._lazyInitEmptyStyle(),this.style.addSprite(_,n,a,h=>{h||this._update(!0)}),this}removeSprite(_){return this._lazyInitEmptyStyle(),this.style.removeSprite(_),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(_,n={}){return this._lazyInitEmptyStyle(),this.style.setSprite(_,n,a=>{a||this._update(!0)}),this}setLight(_,n={}){return this._lazyInitEmptyStyle(),this.style.setLight(_,n),this._update(!0)}getLight(){return this.style.getLight()}setSky(_,n={}){return this._lazyInitEmptyStyle(),this.style.setSky(_,n),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(_,n){return this.style.setFeatureState(_,n),this._update()}removeFeatureState(_,n){return this.style.removeFeatureState(_,n),this._update()}getFeatureState(_){return this.style.getFeatureState(_)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let _=0,n=0;return this._container&&(_=this._container.clientWidth||400,n=this._container.clientHeight||300),[_,n]}_setupResizeObserver(){var _;let n=!1;const a=lf(f=>{this._trackResize&&!this._removed&&(this.resize(f),this.redraw())},50),h=(_=this._ownerWindow.ResizeObserver)!==null&&_!==void 0?_:ResizeObserver;this._resizeObserver=new h(f=>{n?a(f):n=!0}),this._resizeObserver.observe(this._container)}
1256_resolveContainer(_){if(typeof _=="string"){const n=document.getElementById(_);if(!n)throw new Error(`Container '${_}' not found.`);return n}if(_ instanceof HTMLElement||_&&typeof _=="object"&&_.nodeType===1)return _;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){const _=this._container;_.classList.add("maplibregl-map");const n=this._canvasContainer=G.create("div","maplibregl-canvas-container",_);this._interactive&&n.classList.add("maplibregl-interactive"),this._canvas=G.create("canvas","maplibregl-canvas",n),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const a=this._containerDimensions(),h=this._getClampedPixelRatio(a[0],a[1]);this._resizeCanvas(a[0],a[1],h);const f=this._controlContainer=G.create("div","maplibregl-control-container",_),b=this._controlPositions={};for(const E of["top-left","top-right","bottom-left","bottom-right"])b[E]=G.create("div",`maplibregl-ctrl-${E} `,f);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(_,n,a){this._canvas.width=Math.floor(a*_),this._canvas.height=Math.floor(a*n),this._canvas.style.width=`${_}px`,this._canvas.style.height=`${n}px`}_setupPainter(){const _=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let n=null;this._canvas.addEventListener("webglcontextcreationerror",h=>{n={requestedAttributes:_},h&&(n.statusMessage=h.statusMessage,n.type=h.type)},{once:!0});let a=null;if(a=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,_):this._canvas.getContext("webgl2",_)||this._canvas.getContext("webgl",_),!a){const h="Failed to initialize WebGL";throw n?(n.message=h,new Error(JSON.stringify(n))):new Error(h)}this.painter=new jc(a,this.transform)}migrateProjection(_,n){super.migrateProjection(_,n),this.painter.transform=_,this.fire(new c.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(_){var n;return!((n=this.style)===null||n===void 0)&&n._loaded?(this._styleDirty||(this._styleDirty=_),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(_){return this._update(),this._renderTaskQueue.add(_)}_cancelRenderFrame(_){this._renderTaskQueue.remove(_)}_render(_){var n,a,h,f,b,E;const C=this._idleTriggered?this._fadeDuration:0,k=((n=this.style.projection)===null||n===void 0?void 0:n.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(_),this._removed)return;let O=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const $=this.transform.zoom,H=Y();this.style.zoomHistory.update($,H);const oe=new c.J($,{now:H,fadeDuration:C,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),de=oe.crossFadingFactor();de===1&&de===this._crossFadingFactor||(O=!0,this._crossFadingFactor=de),this.style.update(oe)}const F=((a=this.style.projection)===null||a===void 0?void 0:a.transitionState)>0!==k;(h=this.style.projection)===null||h===void 0||h.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((f=this.style.projection)===null||f===void 0?void 0:f.transitionState,(b=this.style.projection)===null||b===void 0?void 0:b.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||F)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGroun
1256d&&this.transform.setElevation(0)),this._placementDirty=(E=this.style)===null||E===void 0?void 0:E._updatePlacement(this.transform,this.showCollisionBoxes,C,this._crossSourceCollisions,F),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:C,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new c.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new c.n("load"))),this.style&&(this.style.hasTransitions()||O)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const U=this._sourcesDirty||this._styleDirty||this._placementDirty;return U||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new c.n("idle")),!this._loaded||this._fullyLoaded||U||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var _,n;this._hash&&this._hash.remove();for(const h of this._controls)h.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(_=this._diffStyleRequest)===null||_===void 0||_.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),Q.removeThrottleControl(this._imageQueueHandle),(n=this._resizeObserver)===null||n===void 0||n.disconnect();const a=this.painter.context.gl.getExtension("WEBGL_lose_context");a!=null&&a.loseContext&&a.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new c.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,Z.frame(this._frameRequest,_=>{this._frameRequest=null;try{this._render(_)}catch(n){if(!c.$(n)&&!function(a){return a.message===gd}(n))throw n}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(_){this._showTileBoundaries!==_&&(this._showTileBoundaries=_,this._update())}get showPadding(){return!!this._showPadding}set showPadding(_){this._showPadding!==_&&(this._showPadding=_,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(_){this._showCollisionBoxes!==_&&(this._showCollisionBoxes=_,_?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(_){this._showOverdrawInspector!==_&&(this._showOverdrawInspector=_,this._update())}get repaint(){return!!this._repaint}set repaint(_){this._repaint!==_&&(this._repaint=_,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(_){this._vertices=_,this._update()}get version(){return Ed}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(_){return this._lazyInitEmptyStyle(),this.style.setProjection(_),this._update(!0)}};const vf={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Hc{constructor(n,a,h=!1){this.mousedown=b=>{this.startMove(b,G.mousePos(this.element,b)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=b=>{this.move(b,G.mousePos(this.element,b))},this.mouseup=b=>{this._rotatePitchHandler.dragEnd(b),this.offTemp()},this.touchstart=b=>{b.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=G.touchPos(this.element,b.targetTouches)[0],this.startMove(b,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=b=>{b.targetTouches.length!==1?this.reset():(this._lastPos=G.touchPos(this.element,b.targetTouches)[0],this.move(b,this._lastPos))},this.touchend=b=>{b.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=a;const f=new uf;this._rotatePitchHandler=new Lo({clickTolerance:3,move:(b,E)=>{const C=a.getBoundingClientRect(),k=new c.P((C.bottom-C.top)/2,(C.right-C.left)/2);return{bearingDelta:c.cx(new c.P(b.x,E.y),E,k),pitchDelta:h?-.5*(E.y-b.y):void 0}},moveStateManager:f,enable:!0,assignEvents:()=>{}}),this.map=n,a.addEventListener("mousedown",this.mousedown),a.addEventListener("touchstart",this.touchstart,{passive:!1}),a.addEventListener("touchcancel",this.reset)}startMove(n,a){this._rotatePitchHandler.dragStart(n,a),G.disableDrag()}move(n,a){const h=this.map,{bearingDelta:f,pitchDelta:b}=this._rotatePitchHandler.dragMove(n,a)||{};f&&h.setBearing(h.getBearing()+f),b&&h.setPitch(h.getPitch()+b)}off(){const n=this.element;n.removeEventListener("mousedown",this.mousedown),n.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),n.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){G.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let Oo;function Id(_,n,a,h=!1){if(h||!a.getCoveringTilesDetailsProvider().allowWorldCopies())return _==null?void 0:_.wrap();const f=new c.W(_.lng,_.lat);if(_=new c.W(_.lng,_.lat),n){const b=new c.W(_.lng-360,_.lat),E=new c.W(_.lng+360,_.lat),C=a.locationToScreenPoint(_).distSqr(n);a.locationToScreenPoint(b).distSqr(n)<C?_=b:a.locationToScreenPoint(E).distSqr(n)<C&&(_=E)}for(;Math.abs(_.lng-a.center.lng)>180;){const b=a.locationToScreenPoint(_);if(b.x>=0&&b.y>=0&&b.x<=a.width&&b.y<=a.height)break;_.lng>a.center.lng?_.lng-=360:_.lng+=360}
1256return _.lng!==f.lng&&a.isPointOnMapSurface(a.locationToScreenPoint(_))?_:f}const Xc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Md(_,n,a){const h=_.classList;for(const f in Xc)h.remove(`maplibregl-${a}-anchor-${f}`);h.add(`maplibregl-${a}-anchor-${n}`)}class Kc extends c.E{constructor(n){if(super(),this._onClick=a=>{this.fire(new c.n("click",{originalEvent:a}))},this._onKeyPress=a=>{a.code!=="Space"&&a.code!=="Enter"||this.togglePopup()},this._onMapClick=a=>{const h=a.originalEvent.target,f=this._element;this._popup&&(h===f||f.contains(h))&&this.togglePopup()},this._update=a=>{if(!this._map)return;const h=this._map.loaded()&&!this._map.isMoving();((a==null?void 0:a.type)==="terrain"||(a==null?void 0:a.type)==="render"&&!h)&&this._map.once("render",this._update),this._lngLat=Id(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let f="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?f=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(f=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let b="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?b="rotateX(0deg)":this._pitchAlignment==="map"&&(b=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||a&&a.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Xc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${b} ${f}`,Z.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity((a==null?void 0:a.type)==="moveend")}).catch(()=>{})},this._onMove=a=>{if(!this._isDragging){const h=this._clickTolerance||this._map._clickTolerance;this._isDragging=a.point.dist(this._pointerdownPos)>=h}this._isDragging&&(this._pos=a.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new c.n("dragstart"))),this.fire(new c.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new c.n("dragend")),this._state="inactive"},this._addDragHandler=a=>{this._element.contains(a.originalEvent.target)&&(a.preventDefault(),this._positionDelta=a.point.sub(this._pos).add(this._offset),this._pointerdownPos=a.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=(n==null?void 0:n.anchor)||"center",this._color=(n==null?void 0:n.color)||"#3FB1CE",this._scale=(n==null?void 0:n.scale)||1,this._draggable=(n==null?void 0:n.draggable)||!1,this._clickTolerance=(n==null?void 0:n.clickTolerance)||0,this._subpixelPositioning=(n==null?void 0:n.subpixelPositioning)||!1,this._isDragging=!1,this._state="inactive",this._rotation=(n==null?void 0:n.rotation)||0,this._rotationAlignment=(n==null?void 0:n.rotationAlignment)||"auto",this._pitchAlignment=n!=null&&n.pitchAlignment&&n.pitchAlignment!=="auto"?n.pitchAlignment:this._rotationAlignment,this.setOpacity(n==null?void 0:n.opacity,n==null?void 0:n.opacityWhenCovered),n==null?void 0:n.element)this._element=n.element,this._offset=c.P.convert((n==null?void 0:n.offset)||[0,0]);else{this._defaultMarker=!0,this._element=G.create("div");const a=G.createNS("http://www.w3.org/2000/svg","svg"),h=41,f=27;a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height",`${h}px`),a.setAttributeNS(null,"width",`${f}px`),a.setAttributeNS(null,"viewBox",`0 0 ${f} ${h}`);const b=G.createNS("http://www.w3.org/2000/svg","g");
1256b.setAttributeNS(null,"stroke","none"),b.setAttributeNS(null,"stroke-width","1"),b.setAttributeNS(null,"fill","none"),b.setAttributeNS(null,"fill-rule","evenodd");const E=G.createNS("http://www.w3.org/2000/svg","g");E.setAttributeNS(null,"fill-rule","nonzero");const C=G.createNS("http://www.w3.org/2000/svg","g");C.setAttributeNS(null,"transform","translate(3.0, 29.0)"),C.setAttributeNS(null,"fill","#000000");const k=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const pe of k){const ge=G.createNS("http://www.w3.org/2000/svg","ellipse");ge.setAttributeNS(null,"opacity","0.04"),ge.setAttributeNS(null,"cx","10.5"),ge.setAttributeNS(null,"cy","5.80029008"),ge.setAttributeNS(null,"rx",pe.rx),ge.setAttributeNS(null,"ry",pe.ry),C.appendChild(ge)}const O=G.createNS("http://www.w3.org/2000/svg","g");O.setAttributeNS(null,"fill",this._color);const F=G.createNS("http://www.w3.org/2000/svg","path");F.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),O.appendChild(F);const U=G.createNS("http://www.w3.org/2000/svg","g");U.setAttributeNS(null,"opacity","0.25"),U.setAttributeNS(null,"fill","#000000");const $=G.createNS("http://www.w3.org/2000/svg","path");$.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),U.appendChild($);const H=G.createNS("http://www.w3.org/2000/svg","g");H.setAttributeNS(null,"transform","translate(6.0, 7.0)"),H.setAttributeNS(null,"fill","#FFFFFF");const oe=G.createNS("http://www.w3.org/2000/svg","g");oe.setAttributeNS(null,"transform","translate(8.0, 8.0)");const de=G.createNS("http://www.w3.org/2000/svg","circle");de.setAttributeNS(null,"fill","#000000"),de.setAttributeNS(null,"opacity","0.25"),de.setAttributeNS(null,"cx","5.5"),de.setAttributeNS(null,"cy","5.5"),de.setAttributeNS(null,"r","5.4999962");const me=G.createNS("http://www.w3.org/2000/svg","circle");me.setAttributeNS(null,"fill","#FFFFFF"),me.setAttributeNS(null,"cx","5.5"),me.setAttributeNS(null,"cy","5.5"),me.setAttributeNS(null,"r","5.4999962"),oe.appendChild(de),oe.appendChild(me),E.appendChild(C),E.appendChild(O),E.appendChild(U),E.appendChild(H),E.appendChild(oe),a.appendChild(E),a.setAttributeNS(null,"height",h*this._scale+"px"),a.setAttributeNS(null,"width",f*this._scale+"px"),this._element.appendChild(a),this._offset=c.P.convert((n==null?void 0:n.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",a=>{a.preventDefault()}),this._element.addEventListener("mousedown",a=>{a.preventDefault()}),Md(this._element,this._anchor,"marker"),n==null?void 0:n.className)for(const a of n.className.split(" "))this._element.classList.add(a);this._popup=null}addTo(n){return this.remove(),this._map=n,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",n._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),n.getCanvasContainer().appendChild(this._element),n.on("move",this._update),n.on("moveend",this._update),n.on("terrain",this._update),n.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(n){return this._lngLat=c.W.convert(n),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(n){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),n){if(!("offset"in n.options)){const f=Math.abs(13.5)/Math.SQRT2;n.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[
12560,-38.1],"bottom-left":[f,-1*(38.1-13.5+f)],"bottom-right":[-f,-1*(38.1-13.5+f)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=n,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(n){return this._subpixelPositioning=n,this}getPopup(){return this._popup}togglePopup(){const n=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:n?(n.isOpen()?n.remove():(n.setLngLat(this._lngLat),n.addTo(this._map)),this):this}_updateOpacity(n=!1){var a,h;const f=(a=this._map)===null||a===void 0?void 0:a.terrain,b=this._map.transform.isLocationOccluded(this._lngLat);if(!f||b){const H=b?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==H&&(this._element.style.opacity=H,this._element.classList.toggle("maplibregl-marker-covered",b)))}if(n)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const E=this._map,C=E.terrain.depthAtPoint(this._pos),k=E.terrain.getElevationForLngLat(this._lngLat,E.transform);if(E.transform.lngLatToCameraDepth(this._lngLat,k)-C<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");const O=-this._offset.y/E.transform.pixelsPerMeter,F=Math.sin(E.getPitch()*Math.PI/180)*O,U=E.terrain.depthAtPoint(new c.P(this._pos.x,this._pos.y-this._offset.y)),$=E.transform.lngLatToCameraDepth(this._lngLat,k+F)-U>.006;!((h=this._popup)===null||h===void 0)&&h.isOpen()&&$&&this._popup.remove(),this._element.style.opacity=$?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",$)}getOffset(){return this._offset}setOffset(n){return this._offset=c.P.convert(n),this._update(),this}addClassName(n){this._element.classList.add(n)}removeClassName(n){this._element.classList.remove(n)}toggleClassName(n){return this._element.classList.toggle(n)}setDraggable(n){return this._draggable=!!n,this._map&&(n?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(n){return this._rotation=n||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(n){return this._rotationAlignment=n||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(n){return this._pitchAlignment=n&&n!=="auto"?n:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(n,a){return(this._opacity===void 0||n===void 0&&a===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),n!==void 0&&(this._opacity=String(n)),a!==void 0&&(this._opacityWhenCovered=String(a)),this._map&&this._updateOpacity(!0),this}}const xf={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let pl=0,sa=!1;const bf={maxWidth:100,unit:"metric"};function Yc(_,n,a){const h=(a==null?void 0:a.maxWidth)||100,f=_._container.clientHeight/2,b=_._container.clientWidth/2,E=_.unproject([b-h/2,f]),C=_.unproject([b+h/2,f]),k=Math.round(_.project(C).x-_.project(E).x),O=Math.min(h,k,_._container.clientWidth),F=E.distanceTo(C);if((a==null?void 0:a.unit)==="imperial"){const U=3.2808*F;U>5280?aa(n,O,U/5280,_._getUIString("ScaleControl.Miles")):aa(n,O,U,_._getUIString("ScaleControl.Feet"))}else(a==null?void 0:a.unit)==="nautical"?aa(n,O,F/1852,_._getUIString("ScaleControl.NauticalMiles")):F>=1e3?aa(n,O,F/1e3,_._getUIString("ScaleControl.Kilometers")):aa(n,O,F,_._getUIString("ScaleControl.Meters"))}function aa(_,n,a,h){const f=function(b){const E=Math.pow(10,`${Math.floor(b)}`.length-1);let C=b/E;return C=C>=10?10:C>=5?5:C>=3?3:C>=2?2:C>=1?1:function(k){const O=Math.pow(10,Math.ceil(-Math.log(k)/Math.LN10));return Math.round(k*O)/O}(C),E*C}(a);_.style.width=n*(f/a)+"px",_.innerHTML=`${f}&nbsp;${h}`}const wf={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0}
vendor: 4,977 bytes, line 1256
1256,Ad=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Rd(_){if(_){if(typeof _=="number"){const n=Math.round(Math.abs(_)/Math.SQRT2);return{center:new c.P(0,0),top:new c.P(0,_),"top-left":new c.P(n,n),"top-right":new c.P(-n,n),bottom:new c.P(0,-_),"bottom-left":new c.P(n,-n),"bottom-right":new c.P(-n,-n),left:new c.P(_,0),right:new c.P(-_,0)}}if(_ instanceof c.P||Array.isArray(_)){const n=c.P.convert(_);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:c.P.convert(_.center||[0,0]),top:c.P.convert(_.top||[0,0]),"top-left":c.P.convert(_["top-left"]||[0,0]),"top-right":c.P.convert(_["top-right"]||[0,0]),bottom:c.P.convert(_.bottom||[0,0]),"bottom-left":c.P.convert(_["bottom-left"]||[0,0]),"bottom-right":c.P.convert(_["bottom-right"]||[0,0]),left:c.P.convert(_.left||[0,0]),right:c.P.convert(_.right||[0,0])}}return Rd(new c.P(0,0))}const Sf=A;v.AJAXError=c.cG,v.EXTENT=c.a6,v.Event=c.n,v.Evented=c.E,v.LngLat=c.W,v.MercatorCoordinate=c.a7,v.Point=c.P,v.addProtocol=c.cH,v.config=c.c,v.removeProtocol=c.cI,v.AttributionControl=Ei,v.BoxZoomHandler=po,v.CanvasSource=wp,v.CooperativeGesturesHandler=vt,v.DoubleClickZoomHandler=yf,v.DragPanHandler=Zi,v.DragRotateHandler=qc,v.EdgeInsets=Xa,v.FullscreenControl=class extends c.E{constructor(_={}){var n;super(),this._onFullscreenChange=()=>{var a;let h=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((a=h==null?void 0:h.shadowRoot)===null||a===void 0)&&a.fullscreenElement;)h=h.shadowRoot.fullscreenElement;h===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(n=_.pseudo)!==null&&n!==void 0&&n,_!=null&&_.container&&(_.container instanceof HTMLElement?this._container=_.container:c.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(_){return this._map=_,this._container||(this._container=this._map.getContainer()),this._controlContainer=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const _=this._fullscreenButton=G.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);G.create("span","maplibregl-ctrl-icon",_).setAttribute("aria-hidden","true"),_.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const _=this._getTitle();this._fullscreenButton.setAttribute("aria-label",_),this._fullscreenButton.title=_}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new c.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new c.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},v.GeoJSONSource=Bu,v.GeolocateControl=class extends c.E{constructor(_){super(),this._onSuccess=n=>{if(this._map){if(this._isOutOfMapMaxBounds(n))return this._setErrorState(),this.fire(new c.n("outofmaxbounds",n)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=n,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_E
1256RROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(n),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(n),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new c.n("geolocate",n)),this._finish()}},this._updateCamera=n=>{const a=new c.W(n.coords.longitude,n.coords.latitude),h=n.coords.accuracy,f=this._map.getBearing(),b=c.e({bearing:f},this.options.fitBoundsOptions),E=bt.fromLngLat(a,h);this._map.fitBounds(E,b,{geolocateSource:!0})},this._updateMarker=n=>{if(n){const a=new c.W(n.coords.longitude,n.coords.latitude);this._accuracyCircleMarker.setLngLat(a).addTo(this._map),this._userLocationDotMarker.setLngLat(a).addTo(this._map),this._accuracy=n.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=n=>{if(this._map){if(n.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(n.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new c.n("error",n)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=n=>{if(!this._map)return;const a=(n==null?void 0:n[0])instanceof ResizeObserverEntry;n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||a||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new c.n("trackuserlocationend")),this.fire(new c.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",n=>{n.preventDefault()}),this._geolocateButton=G.create("button","maplibregl-ctrl-geolocate",this._container),G.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=n=>{if(this._map){if(n===!1){c.w("Geolocation support is not available so the GeolocateControl will be disabled.");const a=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}else{const a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=G.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Kc({element:this._dotElement}),this._circleElement=G.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Kc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=c.e({},xf,_)}onAdd(_){return this._map=_,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return c._(this,arguments,void 0,function*(n=!1){if(Oo!==void 0&&!n)return Oo;if(window.navigator.permissions===void 0)return Oo=!!window.navigator.geolocation,Oo;try{Oo=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Oo=!!window.navigator.geolocation}return Oo})}().then(n=>this._finishSetupUI(n)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,pl=0,sa=!1}_isOutOfMapMaxBounds(_){const n=this._map.getMaxBounds(),a=_.coords;return n&&(a.longitude<n.getWest()||a.longitude>n.getEast()||a.latitude<n.getSouth()||a.latitude>n.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_E
1256RROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){const _=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&_))return;const n=this._map.project(_),a=this._map.unproject([n.x+100,n.y]),h=_.distanceTo(a)/100,f=2*this._accuracy/h;this._circleElement.style.width=`${f.toFixed(2)}px`,this._circleElement.style.height=`${f.toFixed(2)}px`}trigger(){if(!this._setup)return c.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new c.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":pl--,sa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new c.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new c.n("trackuserlocationstart")),this.fire(new c.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let _;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),pl++,pl>1?(_={maximumAge:6e5,timeout:0},sa=!0):(_=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,_)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},v.GlobeControl=class{constructor(){this._toggleProjection=()=>{var _;const n=(_=this._map.getProjection())===null||_===void 0?void 0:_.type;this._map.setProjection(n!=="mercator"&&n?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var _;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((_
1256=this._map.getProjection())===null||_===void 0?void 0:_.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(_){return this._map=_,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=G.create("button","maplibregl-ctrl-globe",this._container),G.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},v.Hash=Nc,v.ImageSource=is,v.KeyboardHandler=wy,v.LngLatBounds=bt,v.LogoControl=_f,v.Map=Cd,v.MapLibreMap=Cd,v.MapMouseEvent=ci,v.MapTouchEvent=Vc,v.MapWheelEvent=fy,v.Marker=Kc,v.NavigationControl=class{constructor(_){this._updateZoomButtons=()=>{const n=this._map.getZoom(),a=n===this._map.getMaxZoom(),h=n===this._map.getMinZoom();this._zoomInButton.disabled=a,this._zoomOutButton.disabled=h,this._zoomInButton.setAttribute("aria-disabled",a.toString()),this._zoomOutButton.setAttribute("aria-disabled",h.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(n,a)=>{const h=this._map._getUIString(`NavigationControl.${a}`);n.title=h,n.setAttribute("aria-label",h)},this.options=c.e({},vf,_),this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",n=>n.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",n=>this._map.zoomIn({},{originalEvent:n})),G.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",n=>this._map.zoomOut({},{originalEvent:n})),G.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",n=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:n}):this._map.resetNorth({},{originalEvent:n})}),this._compassIcon=G.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(_){return this._map=_,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Hc(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(_,n){const a=G.create("button",_,this._container);return a.type="button",a.addEventListener("click",n),a}},v.Popup=class extends c.E{constructor(_){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new c.n("close"))),this),this._update=n=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=G.create("div","maplibregl-popup",this._map.getContainer()),this._tip=G.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const C of this.options.className.split(" "))this._container.classList.add(C);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let a;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Id(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),n&&"point"in n&&n.point&&(
1256a=n.point),this._trackPointer&&!a)return;const h=this._flatPos=this._pos=this._trackPointer&&a?a:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&a?a:this._map.transform.locationToScreenPoint(this._lngLat));let f=this.options.anchor;const b=Rd(this.options.offset);if(!f){const C=this._container.offsetWidth,k=this._container.offsetHeight,O=function(U){var $,H,oe,de;return U?{top:($=U.top)!==null&&$!==void 0?$:0,right:(H=U.right)!==null&&H!==void 0?H:0,bottom:(oe=U.bottom)!==null&&oe!==void 0?oe:0,left:(de=U.left)!==null&&de!==void 0?de:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding);let F;F=h.y+b.bottom.y<k+O.top?["top"]:h.y>this._map.transform.height-k-O.bottom?["bottom"]:[],h.x<C/2+O.left?F.push("left"):h.x>this._map.transform.width-C/2-O.right&&F.push("right"),f=F.length===0?"bottom":F.join("-")}let E=h.add(b[f]);this.options.subpixelPositioning||(E=E.round()),this._container.style.transform=`${Xc[f]} translate(${E.x}px,${E.y}px)`,Md(this._container,f,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=c.e(Object.create(wf),_)}addTo(_){return this._map&&this.remove(),this._map=_,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new c.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(_){return this._lngLat=c.W.convert(_),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(_){return this.setDOMContent(document.createTextNode(_))}setHTML(_){const n=document.createDocumentFragment(),a=document.createElement("body");let h;for(a.innerHTML=_;h=a.firstChild,h;)n.appendChild(h);return this.setDOMContent(n)}getMaxWidth(){var _;return(_=this._container)===null||_===void 0?void 0:_.style.maxWidth}setMaxWidth(_){return this.options.maxWidth=_,this._update(),this}setDOMContent(_){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=G.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(_),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(_){return this._container&&this._container.classList.add(_),this}removeClassName(_){return this._container&&this._container.classList.remove(_),this}setOffset(_){return this.options.offset=_,this._update(),this}toggleClassName(_){if(this._container)return this._container.classList.toggle(_)}setSubpixelPositioning(_){this.options.subpixelPositioning=_}setPadding(_){this.options.padding=_,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=G.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const _=this._container.querySelector(Ad);_&&_.focus()}},v.RasterDEMTileSource=Wr,v.RasterTileSource=Ln,v.ScaleControl=class{constructor(_){this._onMove=()=>{Yc(this._map,this._container,this.options)},this.setUnit=n=>{this.options.unit=n,Yc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},bf),_)}getDefaultPosition(){return"bottom-left"}onAdd(_){return this._map=_,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-scale",_.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}}
1256,v.ScrollZoomHandler=gf,v.Style=Ys,v.TerrainControl=class{constructor(_){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=_}onAdd(_){return this._map=_,this._container=G.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=G.create("button","maplibregl-ctrl-terrain",this._container),G.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},v.TwoFingersTouchPitchHandler=zo,v.TwoFingersTouchRotateHandler=by,v.TwoFingersTouchZoomHandler=xy,v.TwoFingersTouchZoomRotateHandler=ft,v.VectorTileSource=Nr,v.VideoSource=js,v.addSourceType=(_,n)=>c._(void 0,void 0,void 0,function*(){if(Vu(_))throw new Error(`A source type called "${_}" already exists.`);((a,h)=>{Sp[a]=h})(_,n)}),v.clearPrewarmedResources=function(){const _=Je;_&&(_.isPreloaded()&&_.numActive()===1?(_.release(Ke),Je=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},v.createTileMesh=Ja,v.getGlobalDispatcher=Tt,v.getMaxParallelImageRequests=function(){return c.c.MAX_PARALLEL_IMAGE_REQUESTS},v.getRTLTextPluginStatus=function(){return os().getRTLTextPluginStatus()},v.getVersion=function(){return Sf},v.getWorkerCount=function(){return ot.workerCount},v.getWorkerUrl=function(){return c.c.WORKER_URL},v.importScriptInWorkers=function(_){return Tt().broadcast("IS",_)},v.isTimeFrozen=function(){return K.isFrozen()},v.now=Y,v.prewarm=function(){ht().acquire(Ke)},v.restoreNow=function(){K.restoreNow()},v.setMaxParallelImageRequests=function(_){c.c.MAX_PARALLEL_IMAGE_REQUESTS=_},v.setNow=function(_){K.setNow(_)},v.setRTLTextPlugin=function(_,n){return os().setRTLTextPlugin(_,n)},v.setWorkerCount=function(_){ot.workerCount=_},v.setWorkerUrl=function(_){c.c.WORKER_URL=_}});var x=s;return x})})(yL);var P7=yL.exports;const Pa=rA(P7);class Zt{static setup(r={}){Zt.options=r}static get(){return Zt.options||{}}static clear(){Zt.options={},Zt.errorCallback=null}static onError(r){Zt.errorCallback=r}static sendError(r){Zt.errorCallback&&r&&Zt.errorCallback(r)}}Zt.errorCallback=null;Zt.defaultOptions={live:!1,logLevel:"error",host:"https://api.radar.io",version:"v1",debug:!1};const Gl={none:0,error:1,warn:2,info:3,debug:4},S_=()=>{if(window&&window.RADAR_TEST_ENV)return Gl.none;const{logLevel:e,debug:r}=Zt.get();return r?Gl.debug:e?Gl[e]:Gl.error};class Ht{static debug(r,s){S_()===Gl.debug&&console.log(`Radar SDK (debug): ${r.trim()}`,s)}static info(r){S_()>=Gl.info&&console.log(`Radar SDK: ${r.trim()}`)}static warn(r){S_()>=Gl.warn&&console.warn(`Radar SDK: ${r.trim()}`)}static error(r){S_()>=Gl.error&&console.error(`Radar SDK: ${r.trim()}`)}}class _t{static get USER_ID(){return"radar-userId"}static get DEVICE_ID(){return"radar-deviceId"}static get INSTALL_ID(){return"radar-installId"}static get SESSION_ID(){return"radar-sessionId"}static get DESCRIPTION(){return"radar-description"}static get METADATA(){return"radar-metadata"}static get CACHED_LOCATION(){return"radar-cached-location"}static get TRIP_OPTIONS(){return"radar-trip-options"}static get PRODUCT(){return"radar-product"}static getStorage(){const r=window==null?void 0:window.localStorage;return r||Ht.warn("localStorage not available."),r}static setItem(r,s){const u=this.getStorage();u&&s!=null&&u.setItem(r,s)}static getItem(r){const s=this.getStorage();if(!s)return null;const u=s.getItem(r);return u??null}static getJSON(r){const s=this.getItem(r);if(!s)return null;try{return JSON.parse(s)}catch{return Ht.warn(`could not getJSON from storage for key: ${r}`),null}}static removeItem(r){const s=this.getStorage();if(!s)return null;s.removeItem(r)}static clear(){const r=this.getStorage();if(!r)return null;r.clear()}}function dr(e,r,s,u){function m(x){return x instanceof s?x:new s(function(v){v(x)})}
1256return new(s||(s=Promise))(function(x,v){function c(z){try{L(u.next(z))}catch(j){v(j)}}function A(z){try{L(u.throw(z))}catch(j){v(j)}}function L(z){z.done?x(z.value):m(z.value).then(c,A)}L((u=u.apply(e,[])).next())})}class ji extends Error{constructor(r){super(r),this.status=""}}class Jw extends ji{constructor(r){super(r),this.name="RadarPublishableKeyError",this.status="ERROR_PUBLISHABLE_KEY"}}class rv extends ji{constructor(r){super(r),this.name="RadarLocationError",this.status="ERROR_LOCATION"}}class vL extends ji{constructor(r){super(r),this.name="RadarPermissionsError",this.status="ERROR_PERMISSIONS"}}class CI extends ji{constructor(){super("Radar Verify app not running."),this.name="RadarVerifyAppError",this.status="ERROR_VERIFY_APP"}}class C7 extends ji{constructor(r){var s;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Bad request."),this.name="RadarBadRequestError",this.code=400,this.response=r,this.status="ERROR_BAD_REQUEST"}}class I7 extends ji{constructor(r){var s;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Unauthorized."),this.name="RadarUnauthorizedError",this.code=401,this.response=r,this.status="ERROR_UNAUTHORIZED"}}class M7 extends ji{constructor(r){var s;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Payment required."),this.name="RadarPaymentRequiredError",this.code=402,this.response=r,this.status="ERROR_PAYMENT_REQUIRED"}}class A7 extends ji{constructor(r){var s;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Forbidden."),this.name="RadarForbiddenError",this.code=403,this.response=r,this.status="ERROR_FORBIDDEN"}}class R7 extends ji{constructor(r){var s;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Not found."),this.name="RadarNotFoundError",this.code=404,this.response=r,this.status="ERROR_NOT_FOUND"}}class k7 extends ji{constructor(r){var s,u;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Rate limit exceeded."),this.name="RadarRateLimitError",this.code=429,this.response=r,this.type=(u=r==null?void 0:r.meta)===null||u===void 0?void 0:u.type,this.status="ERROR_RATE_LIMIT"}}class II extends ji{constructor(r){var s;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Internal server error."),this.name="RadarServerError",this.response=r,this.status="ERROR_SERVER"}}class rm extends ji{constructor(){super("Request timed out."),this.name="RadarNetworkError",this.status="ERROR_NETWORK"}}class D7 extends ji{constructor(r){var s;super(((s=r==null?void 0:r.meta)===null||s===void 0?void 0:s.message)||"Something went wrong."),this.name="RadarUnknownError",this.response=r,this.status="ERROR_UNKNOWN"}}class L7 extends ji{constructor(r){super(r),this.name="RadarAutocompleteContainerNotFound",this.status="CONTAINER_NOT_FOUND"}}const z7={maximumAge:0,timeout:1e3*10,enableHighAccuracy:!0},MI=e=>e==="high";class Po{static getCurrentPosition(r={}){return dr(this,void 0,void 0,function*(){return new Promise((s,u)=>{const m=Zt.get();if(!navigator||!navigator.geolocation)return u(new rv("navigator.geolocation is not available."));if(m.cacheLocationMinutes)try{const v=_t.getItem(_t.CACHED_LOCATION);if(v){const c=JSON.parse(v),{latitude:A,longitude:L,accuracy:z,expiresAt:j}=c||{};if(Date.now()<parseInt(j)&&A&&L&&z)return s({latitude:A,longitude:L,accuracy:z})}}catch{Ht.warn("could not load cached location.")}const x=Object.assign({},z7);m.locationMaximumAge!==void 0&&(x.maximumAge=m.locationMaximumAge),m.locationTimeout!==void 0&&(x.timeout=m.locationTimeout),m.desiredAccuracy!==void 0&&(x.enableHighAccuracy=MI(m.desiredAccuracy)),r.desiredAccuracy!==void 0&&(x.enableHighAccuracy=MI(r.desiredAccuracy)),Ht.info(`Using geolocation options: ${JSON.stringify(x)}`),navigator.geolocation.getCurrentPosition(v=>{if(!v||!v.coords)return u(new rv("device location return empty coordinates."));const{latitude:c,longitude:A,accuracy:L}=v.coords;if(m.cacheLocationMinutes){const z=Number.parseFloat(m.cacheLocationMinutes),j=Date.now(),V=j+z*60*1e3,Z={latitude:c,longitude:A,accuracy:L,updatedAt:j,expiresAt:V};_t.setItem(_t.CACHED_LOCATION,JSON.stringify(Z))}return s({latitude:c,longitude:A,accuracy:L})},v=>v&&v.code===1?u(new vL("Location permissions denied.")):u(new rv("Could not determine location.")),x)})})}static getPermissionStatus(){return dr(this,void 0,void 0,function*(){return new Promise(r=>{let s="NOT_DETERMINED";if(!navigator||!navigator.permissions)return r(s);navigator.permissions.query({name:"geolocation"}).then(u=>{switch(u.state){case"granted":s="GRANTED_FOREGROUND";break;case"denied":s="DENIED";break;case"prompt":s="NOT_DETERMINED";break}return r(s)})})})}static online(){return navigator&&navigator.onLine}}var mg="4.5.8";const t1=new Map;class cn{static request({method:r,path:s,data:u,host:m,version:x,headers:v={},responseType:c,requestId:A}){return dr(this,void 0,void 0,function*(){return new Promise((L,z)=>{const j=Zt.get(),V=j.publishableKey;if(!V){z(new Jw("publishableKey not set."));return}const Z=m||j.host,K=x||j.version;let Y=`${Z}/${K}/${s}`,ie={};if(Object.keys(u||{}
1256).forEach(ce=>{const xe=u[ce];xe!==void 0&&(ie[ce]=xe)}),r==="GET"){const ce=Object.keys(ie).map(xe=>`${xe}=${encodeURIComponent(ie[xe])}`);if(ce.length>0){const xe=ce.join("&");Y=`${Y}?${xe}`}ie=void 0}if(A){const ce=t1.get(A);ce&&ce.abort()}const Q=new XMLHttpRequest;Q.open(r,Y,!0),A&&t1.set(A,Q);const G={Authorization:V,"Content-Type":"application/json","X-Radar-Device-Type":"Web","X-Radar-SDK-Version":mg};let J={};typeof j.getRequestHeaders=="function"&&(J=j.getRequestHeaders());const ue=Object.assign(G,J,v);Object.keys(ue).forEach(ce=>{Q.setRequestHeader(ce,ue[ce])}),c&&(Q.responseType=c),Q.onload=()=>{var ce;let xe;A&&t1.delete(A);try{Q.responseType==="blob"?xe={code:Q.status,data:Q.response}:xe=JSON.parse(Q.response)}catch{return z(new II(xe))}const Re=(ce=xe==null?void 0:xe.meta)===null||ce===void 0?void 0:ce.error;if(Re==="ERROR_PERMISSIONS")return z(new vL("Location permissions not granted."));if(Re==="ERROR_LOCATION")return z(new rv("Could not determine location."));if(Re==="ERROR_NETWORK")return z(new rm);if(Q.status==200)return L(xe);j.debug&&(Ht.debug(`API call failed: ${Y}`),Ht.debug(JSON.stringify(xe))),Q.status===400?z(new C7(xe)):Q.status===401?z(new I7(xe)):Q.status===402?z(new M7(xe)):Q.status===403?z(new A7(xe)):Q.status===404?z(new R7(xe)):Q.status===429?z(new k7(xe)):500<=Q.status&&Q.status<600?z(new II(xe)):z(new D7(xe))},Q.onerror=function(){z(m&&(m==="http://localhost:52516"||m==="https://radar-verify.com:52516")?Po.online()?new CI:new rm:new rm)},Q.ontimeout=function(){z(m&&(m==="http://localhost:52516"||m==="https://radar-verify.com:52516")?Po.online()?new CI:new rm:new rm)},Q.send(JSON.stringify(ie))})})}}class O7{static validateAddress(r){return dr(this,void 0,void 0,function*(){const s=Zt.get(),u=yield cn.request({method:"GET",path:"addresses/validate",data:r}),{address:m,result:x}=u,v={address:m,result:x};return s.debug&&(v.response=u),v})}}const AI=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const s=Math.random()*16|0;return(r=="x"?s:s&3|8).toString(16)});class ac{static getDeviceId(){const r=_t.getItem(_t.DEVICE_ID);if(r)return r;const s=AI();return _t.setItem(_t.DEVICE_ID,s),s}static getInstallId(){const r=_t.getItem(_t.INSTALL_ID);if(r)return r;const s=AI();return _t.setItem(_t.INSTALL_ID,s),s}}const F7=300,j7=e=>{const r=Math.trunc(Date.now()/1e3),s=Number.parseInt(e);return Math.abs(r-s)<F7};class kS{static getSessionId(){const r=_t.getItem(_t.SESSION_ID);if(r&&j7(r))return r;const s=Math.trunc(Date.now()/1e3).toString();return _t.setItem(_t.SESSION_ID,s),s}}class RI{static getConfig(r={}){return dr(this,void 0,void 0,function*(){if(Zt.get().version!="v1"){Ht.info("Skipping /config call.");return}const u=r.deviceId||ac.getDeviceId(),m=r.installId||ac.getInstallId(),x=kS.getSessionId();let v;try{v=yield Po.getPermissionStatus()}catch(A){Ht.warn(`Location authorization error: ${A.message}`)}const c={deviceId:u,installId:m,sessionId:x,locationAuthorization:v};try{yield cn.request({method:"GET",path:"config",data:c})}catch(A){Ht.warn(`Error calling /config: ${A.message}`)}})}}class N7{static getContext(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();(!r.latitude||!r.longitude)&&(r=yield Po.getCurrentPosition());const{latitude:u,longitude:m,accuracy:x}=r,v=yield cn.request({method:"GET",path:"context",data:{coordinates:`${u},${m}`,accuracy:x}}),{geofences:c,place:A,country:L,state:z,dma:j,postalCode:V}=v,Z={location:r,geofences:c,place:A,country:L,state:z,dma:j,postalCode:V};return s.debug&&(Z.response=v),Z})}}class B7{static logConversion(r){return dr(this,void 0,void 0,function*(){const s=Zt.get(),u=r.name,m=r.userId||_t.getItem(_t.USER_ID),x=r.deviceId||ac.getDeviceId(),v=r.installId||ac.getInstallId(),c=r.metadata||{},A=r.createdAt;r.revenue&&(c.revenue=r.revenue);const L={name:u,userId:m,deviceId:x,installId:v,metadata:c};typeof A=="string"?L.createdAt=A:A instanceof Date?L.createdAt=A.toISOString():L.createdAt=new Date().toISOString();const z=yield cn.request({method:"POST",path:"events",data:L}),j={event:z.event};return s.debug&&(j.response=z),j})}}class r1{static forwardGeocode(r){return dr(this,void 0,void 0,function*(){const s=Zt.get(),{query:u,layers:m,country:x,lang:v}=r,c=yield cn.request({method:"GET",path:"geocode/forward",data:{query:u,layers:m,country:x,lang:v}}),A={addresses:c.addresses};return s.debug&&(A.response=c),A})}static reverseGeocode(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();let{latitude:u,longitude:m,layers:x}=r;if(!u||!m){const A=yield Po.getCurrentPosition();u=A.latitude,m=A.longitude}const v=yield cn.request({method:"GET",path:"geocode/reverse",data:{coordinates:`${u},${m}`,layers:x}}),c={addresses:v.addresses};return s.debug&&(c.response=v),c})}static ipGeocode(){return dr(this,void 0,void 0,function*(){const r=Zt.get(),s=yield cn.request({method:"GET",path:"geocode/ip"}),u={ip:s.ip,address:s.address,proxy:s.proxy};return r.debug&&(u.response=s),u})}}class kI{static distance(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();let{origin:u,destination:m,modes:x,units:v,geometry:c,geometryPoints:A,avoid:L}=r;if(u){if(typeof u!="string"){const{latitude:V,longitude:Z}=u;u=`${V},${Z}`}}else{const{latitude:V,longitude:Z}=yield Po.getCurrentPosition();u=`${V},${Z}`}if(typeof m!="string"){const{latitude:V,longitude:Z}=m;m=`${V},${Z}`}Array.isArray(x)&&(x=x.join(",")),Array.isArray(L)&&(L=L.join(","));const z=yield cn.request({method:"GET",path:"route/distance",data:{origin:u,destination:m,modes:x,units:v,geometry:c,geometryPoints:A,avoid:L}}),j={routes:z.routes};return s.debug&&(j.response=z),j})}static matrix(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();let{origins:u,destinations:m,mode:x,units:v,avoid:c}
1256=r;if(u)Array.isArray(u)&&(u=u.map(z=>`${z.latitude},${z.longitude}`).join("|"));else{const{latitude:z,longitude:j}=yield Po.getCurrentPosition();let V=[];for(let Z=0;Z<m.length;Z++)V.push(`${z},${j}`);u=V.join("|")}Array.isArray(m)&&(m=m.map(z=>`${z.latitude},${z.longitude}`).join("|")),Array.isArray(c)&&(c=c.join(","));const A=yield cn.request({method:"GET",path:"route/matrix",data:{origins:u,destinations:m,mode:x,units:v,avoid:c}}),L={origins:A.origins,destinations:A.destinations,matrix:A.matrix};return s.debug&&(L.response=A),L})}}class nv{static autocomplete(r,s){return dr(this,void 0,void 0,function*(){const u=Zt.get();let{query:m,near:x,limit:v,layers:c,countryCode:A,expandUnits:L,mailable:z,lang:j,postalCode:V}=r;x&&typeof x!="string"&&x.latitude&&x.longitude&&(x=`${x.latitude},${x.longitude}`);const Z=yield cn.request({method:"GET",path:"search/autocomplete",data:{query:m,near:x,limit:v,layers:c,countryCode:A,expandUnits:L,mailable:z,lang:j,postalCode:V},requestId:s}),K={addresses:Z.addresses};return u.debug&&(K.response=Z),K})}static searchGeofences(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();let{near:u,radius:m,tags:x,metadata:v,limit:c,includeGeometry:A}=r;if(u){if(typeof u!="string"){const{latitude:j,longitude:V}=u;u=`${j},${V}`}}else{const{latitude:j,longitude:V}=yield Po.getCurrentPosition();u=`${j},${V}`}Array.isArray(x)&&(x=x.join(","));const L=yield cn.request({method:"GET",path:"search/geofences",data:{near:u,radius:m,tags:x,metadata:v,limit:c,includeGeometry:A}}),z={geofences:L.geofences};return s.debug&&(z.response=L),z})}static searchPlaces(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();let{near:u,radius:m,chains:x,categories:v,groups:c,limit:A}=r;if(u){if(typeof u!="string"){const{latitude:j,longitude:V}=u;u=`${j},${V}`}}else{const{latitude:j,longitude:V}=yield Po.getCurrentPosition();u=`${j},${V}`}Array.isArray(x)&&(x=x.join(",")),Array.isArray(v)&&(v=v.join(",")),Array.isArray(c)&&(c=c.join(","));const L=yield cn.request({method:"GET",path:"search/places",data:{near:u,radius:m,chains:x,categories:v,groups:c,limit:A}}),z={places:L.places};return s.debug&&(z.response=L),z})}}const DI=e=>e&&Object.prototype.toString.call(e)==="[object Date]"&&!isNaN(e);class mn{static setTripOptions(r){if(!r){mn.clearTripOptions();return}const s=JSON.stringify(r);Ht.debug(`Saving trip options: ${s}`),_t.setItem(_t.TRIP_OPTIONS,s)}static getTripOptions(){let r=_t.getItem(_t.TRIP_OPTIONS);return r&&(r=JSON.parse(r)),r}static clearTripOptions(){_t.removeItem(_t.TRIP_OPTIONS)}static startTrip(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();r=r||mn.getTripOptions(),r||Ht.warn('tripOptions not set when calling "startTrip"');const u=r.userId||_t.getItem(_t.USER_ID);u&&u!==_t.getItem(_t.USER_ID)&&_t.setItem(_t.USER_ID,u);const{externalId:m,destinationGeofenceTag:x,destinationGeofenceExternalId:v,mode:c,metadata:A,approachingThreshold:L,scheduledArrivalAt:z}=r,j={userId:u,externalId:m,destinationGeofenceTag:x,destinationGeofenceExternalId:v,mode:c,metadata:A,approachingThreshold:L};DI(z)?j.scheduledArrivalAt=z==null?void 0:z.toJSON():(z&&Ht.warn("Invalid date format for scheduledArrivalAt"),j.scheduledArrivalAt=void 0);const V=yield cn.request({method:"POST",path:"trips",data:j});mn.setTripOptions(r);const Z={trip:V.trip,events:V.events};return s.debug&&(Z.response=V),Z})}static updateTrip(r,s){return dr(this,void 0,void 0,function*(){const u=Zt.get();r=r||mn.getTripOptions(),r||Ht.warn('tripOptions not set when calling "startTrip"');const{externalId:m,destinationGeofenceTag:x,destinationGeofenceExternalId:v,mode:c,metadata:A,approachingThreshold:L,scheduledArrivalAt:z}=r,j={status:s,externalId:m,destinationGeofenceTag:x,destinationGeofenceExternalId:v,mode:c,metadata:A,approachingThreshold:L};DI(z)?j.scheduledArrivalAt=z==null?void 0:z.toJSON():(z&&Ht.warn("Invalid date format for scheduledArrivalAt"),j.scheduledArrivalAt=void 0);const V=yield cn.request({method:"PATCH",path:`trips/${m}/update`,data:j}),Z={trip:V.trip,events:V.events};return u.debug&&(Z.response=V),Z})}static completeTrip(){return dr(this,void 0,void 0,function*(){const r=mn.getTripOptions(),s=yield mn.updateTrip(r,"completed");return mn.clearTripOptions(),s})}static cancelTrip(){return dr(this,void 0,void 0,function*(){const r=mn.getTripOptions(),s=yield mn.updateTrip(r,"canceled");return mn.clearTripOptions(),s})}}const n1=e=>btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),V7=(e,r)=>dr(void 0,void 0,void 0,function*(){const s=new TextEncoder,u=n1(JSON.stringify({alg:"HS256",typ:"JWT"})),m=n1(JSON.stringify(e)),x=s.encode(r),v=s.encode(`${u}.${m}`),c=yield crypto.subtle.importKey("raw",x,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),A=yield crypto.subtle.sign("HMAC",c,v),L=n1(String.fromCharCode(...Array.from(new Uint8Array(A))));return`${u}.${m}.${L}`});class xL{static trackOnce(r){return dr(this,void 0,void 0,function*(){const s=Zt.get();let{latitude:u,longitude:m,accuracy:x,desiredAccuracy:v,fraud:c}=r;if(!u||!m){const se=yield Po.getCurrentPosition({desiredAccuracy:v});u=se.latitude,m=se.longitude,x=se.accuracy}const A=yield Po.getPermissionStatus(),L=r.userId||_t.getItem(_t.USER_ID),z=r.deviceId||ac.getDeviceId(),j=r.installId||ac.getInstallId(),V=kS.getSessionId(),Z=r.deviceType||"Web",K=r.description||_t.getItem(_t.DESCRIPTION);let Y;
1256try{Y=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(se){Ht.warn(`Error getting time zone: ${se.message}`)}L?_t.setItem(_t.USER_ID,L):Ht.warn("userId not provided for trackOnce.");const ie=r.metadata||_t.getJSON(_t.METADATA),Q=r.tripOptions||mn.getTripOptions();Q&&(Q.version="2");const G={},J=_t.getItem(_t.PRODUCT);J&&(G["X-Radar-Product"]=J);const ue=Object.assign(Object.assign({},r),{locationAuthorization:A,accuracy:x,description:K,deviceId:z,deviceType:Z,foreground:!0,installId:j,sessionId:V,latitude:u,longitude:m,metadata:ie,sdkVersion:mg,stopped:!0,userId:L,tripOptions:Q,timeZone:Y});let ce;if(c){const se="https://api-verified.radar.io",ve=navigator.language,Me=navigator.languages,{dk:qe}=yield cn.request({host:se,method:"GET",path:"config",data:{deviceId:z,installId:j,sessionId:V,locationAuthorization:A},headers:{"X-Radar-Desktop-Device-Type":"Web"}}),$e={payload:JSON.stringify(Object.assign(Object.assign({},ue),{lang:ve,langs:Me}))},De=yield V7($e,qe);G["X-Radar-Body-Is-Token"]="true",ce=yield cn.request({host:se,method:"POST",path:"track",data:{token:De},headers:G});let{user:Ze,events:We,token:Ae,expiresAt:Pe,expiresIn:Ke,passed:ot,failureReasons:ze,_id:Je}=ce;const mt={latitude:u,longitude:m,accuracy:x};Pe&&(Pe=new Date(Pe));const ht={user:Ze,events:We,location:mt,token:Ae,expiresAt:Pe,expiresIn:Ke,passed:ot,failureReasons:ze,_id:Je};return s.debug&&(ht.response=ce),ht}ce=yield cn.request({method:"POST",path:"track",data:ue,headers:G});const{user:xe,events:Re}=ce,re={user:xe,events:Re,location:{latitude:u,longitude:m,accuracy:x}};return s.debug&&(re.response=ce),re})}}let nm=null,im=null,i1=!0,o1=null,ma=null,s1=0,LI=null,zI=null,T_=null;class xa{static checkIpChanges(){return dr(this,void 0,void 0,function*(){try{const{ip:r}=yield cn.request({method:"GET",path:"ping"}),s=T_&&r!==T_;return s&&(Ht.info(`IP changed from ${T_} to ${r}`),ma=null),T_=r,s}catch(r){Ht.error(`Error checking IP: ${r}`)}return!1})}static trackVerified(r,s=!1){return dr(this,void 0,void 0,function*(){try{const u=Zt.get(),{skipVerifyApp:m,reason:x}=r,v=r.userId||_t.getItem(_t.USER_ID),c=ac.getDeviceId(),A=ac.getInstallId(),L=kS.getSessionId(),z=r.description||_t.getItem(_t.DESCRIPTION);v?_t.setItem(_t.USER_ID,v):Ht.warn("userId not provided for trackVerified.");const j=r.metadata||_t.getJSON(_t.METADATA);let V;if(m)V=yield xL.trackOnce({userId:v??void 0,description:z??void 0,metadata:j,fraud:!0,reason:x});else{const Z=Object.assign(Object.assign({},r),{description:z,deviceId:c,foreground:!0,installId:A,sessionId:L,metadata:j,sdkVersion:mg,stopped:!0,userId:v,encrypted:s,expectedCountryCode:LI,expectedStateCode:zI});let K=navigator.userAgent;const Y=K&&(K.toLowerCase().includes("mac")||K.toLowerCase().includes("iphone")||K.toLowerCase().includes("ipod")||K.toLowerCase().includes("ipad")),ie=yield cn.request({method:"GET",path:"verify",data:Z,host:Y?"https://radar-verify.com:52516":"http://localhost:52516"});let{user:Q,events:G,token:J,expiresAt:ue,expiresIn:ce,passed:xe,failureReasons:Re,_id:Ce}=ie,re;Q&&Q.location&&Q.location.coordinates&&Q.locationAccuracy&&(re={latitude:Q.location.coordinates[1],longitude:Q.location.coordinates[0],accuracy:Q.locationAccuracy}),ue&&(ue=new Date(ue)),V={user:Q,events:G,location:re,token:J,expiresAt:ue,expiresIn:ce,passed:xe,failureReasons:Re,_id:Ce},u.debug&&(V.response=ie)}return ma=V,s1=performance.now(),o1&&o1(V),V}catch(u){throw Zt.sendError(u),u}})}static startTrackingVerified(r){i1=!0;const s=()=>dr(this,void 0,void 0,function*(){let{interval:m}=r;m||(m=20);let x=m;if(ma){const v=(performance.now()-s1)/1e3,c=ma.expiresIn||0;x=Math.min(c-v,m)}x=x-10,x<10&&(x=10),nm&&clearTimeout(nm),i1&&(nm=setTimeout(u,x*1e3))}),u=()=>dr(this,void 0,void 0,function*(){try{yield this.trackVerified(r)}catch(m){Ht.error(`trackVerified error: ${m.message}`)}s()});r!=null&&r.ipChanges&&(im&&clearInterval(im),im=setInterval(()=>dr(this,void 0,void 0,function*(){(yield xa.checkIpChanges())&&u()}),1e4)),this.isLastTokenValid()?s():u()}static stopTrackingVerified(){i1=!1,nm&&clearTimeout(nm),im&&clearInterval(im)}static getVerifiedLocationToken(r){return dr(this,void 0,void 0,function*(){return this.isLastTokenValid()?ma:this.trackVerified(r)})}static clearVerifiedLocationToken(){ma=null}static isLastTokenValid(){if(!ma)return!1;
1256const r=(performance.now()-s1)/1e3;return ma.passed&&r<(ma.expiresIn||0)}static setExpectedJurisdiction(r,s){LI=r||null,zI=s||null}static onTokenUpdated(r){o1=r}}const U7=e=>e.includes("_sk_"),$7=e=>e.includes("_live_");let G7=class{static get VERSION(){return mg}static initialize(r,s={}){if(!r)throw new Jw("Publishable key required in initialization.");if(U7(r))throw new Jw("Secret keys are not allowed. Please use your Radar publishable key.");const u=$7(r),m=u?"error":"info",x=!u,v=Object.assign(Zt.defaultOptions,{publishableKey:r,live:u,logLevel:m,debug:x},s);Zt.setup(v),Ht.info(`initialized with ${u?"live":"test"} publishableKey.`),s.debug&&Ht.debug("using options",s),window!=null&&window.RADAR_TEST_ENV||RI.getConfig()}static clear(){Zt.clear()}static setUserId(r){if(!r){_t.removeItem(_t.USER_ID);return}_t.setItem(_t.USER_ID,String(r).trim())}static setDescription(r){if(!r){_t.removeItem(_t.DESCRIPTION);return}_t.setItem(_t.DESCRIPTION,String(r).trim())}static setMetadata(r){if(!r){_t.removeItem(_t.METADATA);return}_t.setItem(_t.METADATA,JSON.stringify(r))}static getLocation(){return Po.getCurrentPosition()}static trackOnce(r={}){try{return xL.trackOnce(r)}finally{RI.getConfig(r)}}static trackVerified(r={}){return xa.trackVerified(r)}static startTrackingVerified(r){xa.startTrackingVerified(r)}static stopTrackingVerified(){xa.stopTrackingVerified()}static getVerifiedLocationToken(r={}){return xa.getVerifiedLocationToken(r)}static clearVerifiedLocationToken(){xa.clearVerifiedLocationToken()}static setExpectedJurisdiction(r,s){xa.setExpectedJurisdiction(r,s)}static getContext(r){return N7.getContext(r)}static setTripOptions(r){mn.setTripOptions(r)}static clearTripOptions(){mn.clearTripOptions()}static getTripOptions(){return mn.getTripOptions()}static startTrip(r){return mn.startTrip(r)}static updateTrip(r){return mn.updateTrip(r)}static completeTrip(){return mn.completeTrip()}static cancelTrip(){return mn.cancelTrip()}static logConversion(r){return B7.logConversion(r)}static setProduct(r){if(!r){_t.removeItem(_t.PRODUCT);return}_t.setItem(_t.PRODUCT,String(r).trim())}static onTokenUpdated(r){xa.onTokenUpdated(r)}static onError(r){Zt.onError(r)}static forwardGeocode(r){return r1.forwardGeocode(r)}static reverseGeocode(r){return r1.reverseGeocode(r)}static ipGeocode(){return r1.ipGeocode()}static autocomplete(r){return nv.autocomplete(r)}static searchGeofences(r){return nv.searchGeofences(r)}static searchPlaces(r){return nv.searchPlaces(r)}static validateAddress(r){return O7.validateAddress(r)}static distance(r){return kI.distance(r)}static matrix(r){return kI.matrix(r)}};class q7{constructor(r,s,u){this.type=r,this.feature=s,this.originalEvent=u}}class bL{constructor(r,s){var u;this._sourceIds=[],this._layerIds=[],this.id=((u=s.id)!==null&&u!==void 0?u:`feature-${Date.now()}`).toString(),(r.getFeatures()||[]).forEach(m=>{if(m.id===this.id)throw new Error(`RadarMapFeature: feature with id ${this.id} already exists.`)}),this.geometry=s.geometry,this.properties=s.properties||{},this._feature=s,this._map=r}remove(){this._layerIds.forEach(r=>{this._map.getLayer(r)&&this._map.removeLayer(r)}),this._sourceIds.forEach(r=>{this._map.getSource(r)&&this._map.removeSource(r)}),this._map._features=this._map._features.filter(r=>r.id!==this.id)}on(r,s){this._map.on(r,this.id,u=>{s(new q7(r,this,u))}),r==="click"&&(this._map.on("mouseenter",this.id,()=>{this._map.getCanvas().style.cursor="pointer"}),this._map.on("mouseleave",this.id,()=>{this._map.getCanvas().style.cursor=""}))}}const W7=(e,r=6)=>{let s=0,u=0,m=0,x=[],v=0,c=0,A=null,L,z,j=Math.pow(10,r||6);for(;s<e.length;){A=null,v=0,c=0;do A=e.charCodeAt(s++)-63,c|=(A&31)<<v,v+=5;while(A>=32);L=c&1?~(c>>1):c>>1,v=c=0;do A=e.charCodeAt(s++)-63,c|=(A&31)<<v,v+=5;while(A>=32);z=c&1?~(c>>1):c>>1,u+=L,m+=z,x.push([m/j,u/j])}return x},Nv=e=>{const r={};return Object.entries(e).forEach(([s,u])=>{u!==void 0&&(r[s]=u)}),r},DS=(e,r={})=>{let s=Object.assign({},e);for(const u in r)r[u]instanceof Object&&!Array.isArray(r[u])&&u in e?s[u]=DS(e[u],r[u]):Array.isArray(r[u])&&Array.isArray(e[u])?s[u]=e[u].concat(r[u]):s[u]=r[u];return s},Z7={paint:{"line-cap":"round","line-color":"#000257","line-width":4,"border-color":"#FFFFFF","border-width":2}};class Bv extends bL{constructor(r,s,u){super(r,s);const m=this.id,x=DS(Z7,u),v=()=>{if(x.paint=x.paint||{},r.addSource(m,{type:"geojson",data:s}),this._sourceIds.push(m),x.paint["line-width"]&&x.paint["border-width"]){const c=`${m}-border`,A=x.paint["line-width"]+x.paint["border-width"];r.addLayer({id:c,source:m,type:"line",layout:{"line-cap":x.paint["line-cap"]},paint:Nv({"line-color":x.paint["border-color"],"line-opacity":x.paint["border-opacity"],"line-width":A})}),this._layerIds.push(c)}r.addLayer({id:m,source:m,type:"line",layout:{"line-cap":x.paint["line-cap"]},paint:Nv({"line-color":x.paint["line-color"],"line-width":x.paint["line-width"],"line-opacity":x.paint["line-opacity"],"line-offset":x.paint["line-offset"],"line-blur"
1256:x.paint["line-blur"],"line-dasharray":x.paint["line-dasharray"],"line-gap-width":x.paint["line-gap-width"],"line-gradient":x.paint["line-gradient"]})}),this._layerIds.push(m)};return r.loaded()?v():r.once("data",()=>{v()}),this}static fromPolyline(r,s,u){const m=(u==null?void 0:u.id)||`polyline-feature-${Date.now()}`,x=W7(s,u==null?void 0:u.precision),v={id:m,type:"Feature",geometry:{type:"LineString",coordinates:x},properties:(u==null?void 0:u.properties)||{}};return new Bv(r,v,u)}}const H7={paint:{"fill-color":"#FF6F00","fill-opacity":.3,"border-color":"#FF6F00","border-opacity":1,"border-width":2}};class X7 extends bL{constructor(r,s,u){super(r,s);const m=this.id,x=DS(H7,u),v=()=>{if(x.paint=x.paint||{},r.addSource(m,{type:"geojson",data:s}),this._sourceIds.push(m),r.addLayer({id:m,source:m,type:"fill",layout:{},paint:Nv({"fill-color":x.paint["fill-color"],"fill-opacity":x.paint["fill-opacity"]})}),this._layerIds.push(m),x.paint["border-color"]&&x.paint["border-width"]&&x.paint["border-opacity"]){let c=`${m}-border`;r.addLayer({id:c,source:m,type:"line",layout:{},paint:Nv({"line-color":x.paint["border-color"],"line-opacity":x.paint["border-opacity"],"line-width":x.paint["border-width"]})}),this._layerIds.push(c)}};return r.loaded()?v():r.once("data",()=>{v()}),this}}const K7="https://api.radar.io/maps/static/images/logo.svg";class Y7{onAdd(){const r=document.createElement("img");return r.src=K7,r.alt="Radar Maps Platform",this.link=document.createElement("a"),this.link.id="radar-map-logo",this.link.href="https://radar.com?ref=powered_by_radar",this.link.target="_blank",this.link.style.pointerEvents="auto",this.link.appendChild(r),this.link}onRemove(){var r;(r=this.link)===null||r===void 0||r.remove()}}const a1=(e,r)=>{r.forEach(s=>{e.push(s)})},Q7=e=>{const r=[],s=e.geometry;switch(s.type){case"Point":r.push(s.coordinates);break;case"MultiPoint":case"LineString":a1(r,s.coordinates);break;case"MultiLineString":case"Polygon":s.coordinates.forEach(u=>a1(r,u));break;case"MultiPolygon":s.coordinates.forEach(u=>{u.forEach(m=>a1(r,m))});break;default:return r}return r},J7=e=>{const r=[];return(e||[]).forEach(s=>{Q7(s).forEach(m=>{r.push(m)})}),r},e$="radar-default-v1",t$=["radar-default-v1","radar-light-v1","radar-dark-v1"],r$={showZoomControls:!0},n$={maxZoom:20,attributionControl:!1,dragRotate:!1,touchPitch:!1,maplibreLogo:!1},i$={padding:50},wL=(e,r)=>{const s=r.style||e$;let u=`${e.host}/maps/styles/${s}`;return r.language&&(u+=`?language=${r.language}`),u},SL=e=>!!(t$.includes(e)||!/^(http:|https:)/.test(e)),o$=(e,r)=>{const s=r.style;return!s||typeof s=="string"&&SL(s)?wL(e,r):r.style};class s$ extends Pa.Map{constructor(r){const s=Zt.get();s.publishableKey||Ht.warn("publishableKey not set. Call Radar.initialize() with key before creating a new map.");const u=o$(s,r),m=Object.assign({},r$,n$,r,{style:u},{validateStyle:!s.live});Ht.debug("map initialized with options",m),m.transformRequest=(z,j)=>{j==="Style"&&SL(z)&&(z=wL(s,Object.assign(Object.assign({},m),{style:z})));let V={Authorization:s.publishableKey,"X-Radar-Device-Type":"Web","X-Radar-SDK-Version":mg};return typeof s.getRequestHeaders=="function"&&(V=Object.assign(V,s.getRequestHeaders())),{url:z,headers:V}},super(m),this._markers=[],this._features=[];const x=this.getContainer();!x.style.width&&!x.style.height&&Ht.warn('map container does not have a set "width" or "height"');const v=new Y7;this.addControl(v,"bottom-left");const c=new Pa.AttributionControl({compact:!1});this.addControl(c,"bottom-right");const A=new Pa.NavigationControl({showCompass:!1,showZoom:m.showZoomControls});this.addControl(A,"bottom-right");const L=()=>{const z=document.querySelector(".maplibregl-ctrl-attrib");z&&(this.getContainer().clientWidth<380?z.classList.add("hidden"):z.classList.remove("hidden"))};this.on("resize",L),this.on("load",L)}addMarker(r){this._markers.push(r)}removeMarker(r){this._markers=this._markers.filter(s=>s!==r)}getMarkers(){return this._markers}fitToMarkers(r={},s){const u=s||this.getMarkers();if(u.length===0)return;const m=new Pa.LngLatBounds;u.forEach(v=>{m.extend(v.getLngLat())});const x=Object.assign(i$,r);this.fitBounds(m,x)}
1256clearMarkers(){this._markers.forEach(r=>{r.remove()})}getFeatures(){return this._features}fitToFeatures(r={},s){const u=(s||this._features).map(x=>x._feature),m=J7(u);if(m.length>0){const x=new Pa.LngLatBounds;m.forEach(v=>{x.extend(v)}),this.fitBounds(x,r)}}clearFeatures(){this._features.forEach(r=>{r.remove()})}addPolygon(r,s){const u=new X7(this,r,s);return this._features.push(u),u}addLine(r,s){const u=new Bv(this,r,s);return this._features.push(u),u}addPolyline(r,s){const u=Bv.fromPolyline(this,r,s);return this._features.push(u),u}}class a${constructor(r,s,u){this.target=s,this.originalEvent=u,this.point=s._pos,this.lngLat=s.getLngLat(),this.type=r}}const zh=new Map,OI=(e,r=5e3)=>new Promise((s,u)=>{if(!zh.has(e))return zh.set(e,"pending"),u("miss");const m=Date.now(),x=setInterval(()=>{const v=zh.get(e);v==="pending"?Date.now()-m>r&&(clearInterval(x),u("timed out")):v==="failed"?(clearInterval(x),u("failed")):v!==void 0&&(clearInterval(x),s(v))},100)}),l$=e=>{const r=document.createElement("img");return r.src=e.url,e.width&&(typeof e.width=="number"?r.width=e.width:r.style.width=e.width),e.height&&(typeof e.height=="number"?r.height=e.height:r.style.height=e.height),!e.width&&!e.height&&(r.style.maxWidth="64px",r.style.maxHeight="64px",r.style.width="100%",r.style.height="100%"),r},c$={color:"#000257"};class u$ extends Pa.Marker{constructor(r){const s=Object.assign({},c$);if(r.color&&(s.color=r.color),r.element&&(s.element=r.element),r.scale&&(s.scale=r.scale),super(s),r.marker||r.url){const m=this._element.cloneNode(!0);this._element.childNodes.forEach(c=>{c.remove()});const x=c=>{this._element.replaceChildren(l$({width:r.width,height:r.height,url:c}))},v=c=>{Ht.error(`Could not load marker: ${c.message} - falling back to default marker`),zh.set(r.url,"failed"),this._element.replaceChildren(...Array.from(m.childNodes))};if(r.url){const c=()=>{fetch(r.url).then(A=>{A.status===200?A.blob().then(L=>{const z=URL.createObjectURL(L);zh.set(r.url,z),x(z)}).catch(v):v(new Error(A.statusText))}).catch(v)};OI(r.url).then(x).catch(A=>{A!=="miss"&&Ht.debug(`RadarMarker: cache lookup for ${r.url}: ${A}`),c()})}if(r.marker){const c=()=>{cn.request({method:"GET",version:"maps",path:`markers/${r.marker}`,responseType:"blob"}).then(({data:A})=>{const L=URL.createObjectURL(A);zh.set(r.marker,L),x(L)}).catch(v)};OI(r.marker).then(x).catch(A=>{A!=="miss"&&Ht.debug(`RadarMarker: cache lookup for ${r.marker} ${A}`),c()})}}if(r.text&&(Ht.warn('marker option "text" is deprecated, and will be removed in a future version. Use "popup.text".'),r.popup=r.popup||{},r.popup.text=r.text),r.html&&(Ht.warn('marker option "html" is deprecated, and will be removed in a future version. Use "popup.html".'),r.popup=r.popup||{},r.popup.html=r.html),r.popup){const m=new Pa.Popup(r.popup);r.popup.text&&m.setText(r.popup.text),r.popup.html&&m.setHTML(r.popup.html),r.popup.element&&m.setDOMContent(r.popup.element),this.setPopup(m)}const u=this.getElement();u&&u.addEventListener("click",m=>{m.stopPropagation(),this.getPopup()&&((this._map.getMarkers()||[]).forEach(x=>{var v;!((v=x.getPopup())===null||v===void 0)&&v.isOpen()&&x.togglePopup()}),this.togglePopup()),this.fire("click",new a$("click",this,m))})}addTo(r){return r.addMarker(this),super.addTo(r)}remove(){return this._map&&this._map.removeMarker(this),super.remove()}}class d$ extends Pa.Popup{constructor(r){super(r),r.text&&this.setText(r.text),r.html&&this.setHTML(r.html),r.element&&this.setDOMContent(r.element)}}class E_{static getMapLibre(){return Pa}static createMap(r){return new s$(r)}static createMarker(r={}){return new u$(r)}static createPopup(r){return new d$(r)}}const An={WRAPPER:"radar-autocomplete-wrapper",INPUT:"radar-autocomplete-input",SEARCH_ICON:"radar-autocomplete-search-icon",RESULTS_LIST:"radar-autocomplete-results-list",RESULTS_ITEM:"radar-autocomplete-results-item",RESULTS_MARKER:"radar-autocomplete-results-marker",SELECTED_ITEM:"radar-autocomplete-results-item-selected",POWERED_BY_RADAR:"radar-powered",NO_RESULTS:"radar-no-results"},h$={container:"autocomplete",debounceMS:200,minCharacters:3,limit:8,placeholder:"Search address",responsive:!0,disabled:!1,showMarkers:!0,hideResultsOnBlur:!0},e2=e=>typeof e=="number"?`${e}px`:e,p$=400,l1=(e,r)=>{if(r.responsive){e.style.width="100%",r.width&&(e.style.maxWidth=e2(r.width));return}e.style.width=e2(r.width||p$),e.style.removeProperty("max-width")},FI=(e,r)=>{r.maxHeight&&(e.style.maxHeight=e2(r.maxHeight),e.style.overflowY="auto")},c1=(e="#ACBDC8")=>`data:image/svg+xml;
1256charset=utf-8,${`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1257    <path d="M12.5704 6.57036C12.5704 4.11632 10.6342 2.11257 8.21016 2C8.14262 2 8.06757 2 8.00003 2C7.93249 2 7.85744 2 7.7899 2C5.35838 2.11257 3.42967 4.11632 3.42967 6.57036C3.42967 6.60037 3.42967 6.6379 3.42967 6.66792C3.42967 6.69794 3.42967 6.73546 3.42967 6.76548C3.42967 9.46717 7.09196 13.3621 7.4672 13.7598C7.61729 13.9174 7.84994 14 8.00003 14C8.15012 14 8.38277 13.9174 8.53286 13.7598C8.9156 13.3621 12.5704 9.46717 12.5704 6.76548C12.5704 6.72795 12.5704 6.69794 12.5704 6.66792C12.5704 6.6379 12.5704 6.60037 12.5704 6.57036ZM7.99252 8.28893C7.04693 8.28893 6.27395 7.52345 6.27395 6.57036C6.27395 5.61726 7.03943 4.85178 7.99252 4.85178C8.94562 4.85178 9.7111 5.61726 9.7111 6.57036C9.7111 7.52345 8.94562 8.28893 7.99252 8.28893Z" fill="${e.replace("#","%23")}"/>
1258  </svg>`.trim()}`;class LS{static createAutocomplete(r){return new LS(r)}constructor(r={}){this.config=Object.assign({},h$,r),this.isOpen=!1,this.debouncedFetchResults=this.debounce(this.fetchResults,this.config.debounceMS),this.results=[],this.highlightedIndex=-1,this.config.threshold!==void 0&&(this.config.minCharacters=this.config.threshold,Ht.warn('AutocompleteUI option "threshold" is deprecated, use "minCharacters" instead.')),r.near&&(typeof r.near=="string"?this.near=r.near:this.near=`${r.near.latitude},${r.near.longitude}`);let s;if(typeof this.config.container=="string"?s=document.getElementById(this.config.container):s=this.config.container,!s)throw new L7(`Could not find container element: ${this.config.container}`);if(this.container=s,this.wrapper=document.createElement("div"),this.wrapper.classList.add(An.WRAPPER),this.wrapper.style.display=this.config.responsive?"block":"inline-block",l1(this.wrapper,this.config),this.resultsList=document.createElement("ul"),this.resultsList.classList.add(An.RESULTS_LIST),this.resultsList.setAttribute("id",An.RESULTS_LIST),this.resultsList.setAttribute("role","listbox"),this.resultsList.setAttribute("aria-live","polite"),this.resultsList.setAttribute("aria-label","Search results"),FI(this.resultsList,this.config),s.nodeName==="INPUT")this.inputField=s,this.wrapper.appendChild(this.resultsList),s.parentNode.appendChild(this.wrapper);else{this.inputField=document.createElement("input"),this.inputField.classList.add(An.INPUT),this.inputField.placeholder=this.config.placeholder,this.inputField.type="text",this.inputField.disabled=this.config.disabled;const u=document.createElement("div");u.classList.add(An.SEARCH_ICON),this.wrapper.appendChild(this.inputField),this.wrapper.appendChild(this.resultsList),this.wrapper.appendChild(u),this.container.appendChild(this.wrapper)}this.inputField.setAttribute("autocomplete","off"),this.inputField.setAttribute("role","combobox"),this.inputField.setAttribute("aria-controls",An.RESULTS_LIST),this.inputField.setAttribute("aria-expanded","false"),this.inputField.setAttribute("aria-haspopup","listbox"),this.inputField.setAttribute("aria-autocomplete","list"),this.inputField.setAttribute("aria-activedescendant",""),this.inputField.addEventListener("input",this.handleInput.bind(this)),this.inputField.addEventListener("keydown",this.handleKeyboardNavigation.bind(this)),this.config.hideResultsOnBlur&&this.inputField.addEventListener("blur",this.close.bind(this),!0),Ht.debug("AutocompleteUI initialized with options",this.config)}handleInput(){const r=this.inputField.value;r.length<this.config.minCharacters||this.debouncedFetchResults(r).then(s=>{const u=this.config.onResults;u&&u(s),this.displayResults(s)}).catch(s=>{Ht.warn(`Autocomplete ui error: ${s.message}`);const u=this.config.onError;u&&u(s)})}debounce(r,s){let u,m,x;return(...v)=>(clearTimeout(u),u=setTimeout(()=>{const c=r.apply(this,v);c instanceof Promise&&c.then(A=>{m&&m(A)}).catch(A=>{x&&x(A)})},s),new Promise((c,A)=>{m=c,x=A}))}fetchResults(r){return dr(this,void 0,void 0,function*(){const{limit:s,layers:u,countryCode:m,expandUnits:x,mailable:v,lang:c,postalCode:A,onRequest:L}=this.config,z={query:r,limit:s,layers:u,countryCode:m,expandUnits:x,mailable:v,lang:c,postalCode:A};this.near&&(z.near=this.near),L&&L(z);const{addresses:j}=yield nv.autocomplete(z,"autocomplete-ui");return j})}displayResults(r){this.clearResultsList(),this.results=r;let s;if(this.config.showMarkers&&(s=document.createElement("img"),s.classList.add(An.RESULTS_MARKER),s.setAttribute("src",c1(this.config.markerColor))),r.forEach((u,m)=>{const x=document.createElement("li");x.classList.add(An.RESULTS_ITEM),x.setAttribute("role","option"),x.setAttribute("id",`${An.RESULTS_ITEM}}-${m}`);let v;if(u.formattedAddress.includes(u.addressLabel)&&u.layer!=="postalCode"){const c=new RegExp(`(${u.addressLabel}),?`);v=u.formattedAddress.replace(c,"<b>$1</b>")}else v=`<b>${u.placeLabel||u.addressLabel}</b> ${u.formattedAddress}`;x.innerHTML=v,s&&x.prepend(s.cloneNode()),x.addEventListener("mousedown",()=>{this.select(m)}),this.resultsList.appendChild(x)}),this.open(),r.length>0){const u=document.createElement("a");u.href="https://radar.com?ref=powered_by_radar",u.target="_blank",this.poweredByLink=u;
1258const m=document.createElement("span");m.textContent="Powered by",u.appendChild(m);const x=document.createElement("span");x.id="radar-powered-logo",x.textContent="Radar",u.appendChild(x);const v=document.createElement("div");v.classList.add(An.POWERED_BY_RADAR),v.appendChild(u),this.resultsList.appendChild(v)}else{const u=document.createElement("div");u.classList.add(An.NO_RESULTS),u.textContent="No results",this.resultsList.appendChild(u)}}open(){this.isOpen||(this.inputField.setAttribute("aria-expanded","true"),this.resultsList.removeAttribute("hidden"),this.isOpen=!0)}close(r){if(!this.isOpen)return;const s=r&&r.relatedTarget===this.poweredByLink;setTimeout(()=>{this.inputField.setAttribute("aria-expanded","false"),this.inputField.setAttribute("aria-activedescendant",""),this.resultsList.setAttribute("hidden",""),this.highlightedIndex=-1,this.isOpen=!1,this.clearResultsList()},s?100:0)}goTo(r){if(!this.isOpen||!this.results.length)return;r<0?r=this.results.length-1:r>=this.results.length&&(r=0);const s=this.resultsList.getElementsByTagName("li");this.highlightedIndex>-1&&s[this.highlightedIndex].classList.remove(An.SELECTED_ITEM),s[r].classList.add(An.SELECTED_ITEM),this.inputField.setAttribute("aria-activedescendant",`${An.RESULTS_ITEM}-${r}`),this.highlightedIndex=r}handleKeyboardNavigation(r){let s=r.key;if(this.isOpen)switch(s==="Tab"&&r.shiftKey&&(s="ArrowUp"),s){case"Tab":case"ArrowDown":r.preventDefault(),this.goTo(this.highlightedIndex+1);break;case"ArrowUp":r.preventDefault(),this.goTo(this.highlightedIndex-1);break;case"Enter":this.select(this.highlightedIndex);break;case"Esc":this.close();break}}select(r){const s=this.results[r];if(!s){Ht.warn(`No autocomplete result found at index: ${r}`);return}let u;s.formattedAddress.includes(s.addressLabel)?u=s.formattedAddress:u=`${s.placeLabel||s.addressLabel}, ${s.formattedAddress}`,this.inputField.value=u;const m=this.config.onSelection;m&&m(s),this.close()}clearResultsList(){this.resultsList.innerHTML="",this.results=[]}remove(){Ht.debug("AutocompleteUI removed."),this.inputField.remove(),this.resultsList.remove(),this.wrapper.remove()}setNear(r){return r==null?this.near=void 0:typeof r=="string"?this.near=r:this.near=`${r.latitude},${r.longitude}`,this}setPlaceholder(r){return this.config.placeholder=r,this.inputField.placeholder=r,this}setDisabled(r){return this.config.disabled=r,this.inputField.disabled=r,this}setResponsive(r){return this.config.responsive=r,l1(this.wrapper,this.config),this}setWidth(r){return r===null?this.config.width=void 0:(typeof r=="string"||typeof r=="number")&&(this.config.width=r),l1(this.wrapper,this.config),this}setMaxHeight(r){return r===null?this.config.maxHeight=void 0:(typeof r=="string"||typeof r=="number")&&(this.config.maxHeight=r),FI(this.resultsList,this.config),this}setMinCharacters(r){return this.config.minCharacters=r,this.config.threshold=r,this}setLimit(r){return this.config.limit=r,this}setLang(r){return r===null?this.config.lang=void 0:typeof r=="string"&&(this.config.lang=r),this}setPostalCode(r){return r===null?this.config.postalCode=void 0:typeof r=="string"&&(this.config.postalCode=r),this}setShowMarkers(r){if(this.config.showMarkers=r,r){const s=document.createElement("img");s.classList.add(An.RESULTS_MARKER),s.setAttribute("src",c1(this.config.markerColor));const u=this.resultsList.getElementsByTagName("li");for(let m=0;m<u.length;m++)u[m].getElementsByClassName(An.RESULTS_MARKER)[0]||u[m].prepend(s.cloneNode())}else{const s=this.resultsList.getElementsByTagName("li");for(let u=0;u<s.length;u++){const m=s[u].getElementsByClassName(An.RESULTS_MARKER)[0];m&&m.remove()}}return this}setMarkerColor(r){this.config.markerColor=r;const s=this.resultsList.getElementsByClassName(An.RESULTS_MARKER);for(let u=0;u<s.length;u++)s[u].setAttribute("src",c1(r));return this}setHideResultsOnBlur(r){return this.config.hideResultsOnBlur=r,r?this.inputField.addEventListener("blur",this.close.bind(this),!0):this.inputField.removeEventListener("blur",this.close.bind(this),!0),this}}class El extends G7{static get ui(){return{maplibregl:E_.getMapLibre(),map:E_.createMap,marker:E_.createMarker,popup:E_.createPopup,autocomplete:LS.createAutocomplete}}}function Na(){const{data:e,isLoading:r,isError:s,refetch:u}=ip({queryKey:["/api/auth/user"],queryFn:$k({on401:"returnNull"}),retry:!1,staleTime:3e4,refetchOnMount:!0,refetchOnWindowFocus:!1});return{user:e??void 0,isLoading:r,isError:s,isAuthenticated:!!e,refetch:u}}const jI="jori-meninas-ferrol-2026",DJ="meninas-ferrol-2026-artist-",LJ=[{number:1,artist:"Galien Soup",zone:"porta",lat:43.49124,lng:-8.21694,large:!0},{number:2,artist:"Beucha",zone:"porta",lat:43.49012,lng:-8.21831,large:!0},{number:3,artist:"Willy Anido",zone:"porta",lat:43.48802,lng:-8.21563,large:!0},{number:4,artist:"María Die",zone:"baluarte",lat:43.48935,lng:-8.22022,large:!0},{number:5,artist:"Mayl Shambala",zone:"baluarte",lat:43.48874,lng:-8.22168,large:!0},{number:6,artist:"Sr. Gotta",zone:"baluarte",lat:43.48862,lng:-8.22218,large:!1},{number:7,artist:"Fire",zone:"baluarte",lat:43.48836,lng:-8.22232,large:!0},{number:8,artist:"Pastron #7",zone:"baluarte",lat:43.48828,lng:-8.22155,large:!1},{number:9,artist:"Leticia D. Sahagún",zone:"baluarte",lat:43.48748,lng:-8.22108,large:!0},{number:10,artist:"Sfhir",zone:"baluarte",lat:43.48732,lng:-8.22535,large:!0},{number:11,artist:"Alex",zone:"baluarte",lat:43.48718,lng:-8.22188,large:!1},{number:12,artist:"Gon",zone:"cruceiro",lat:43.48568,lng:-8.22132,large:!0},{number:13,artist:"Hermonos",zone:"cruceiro",lat:43.48612,lng:-8.22438,large:!0},{number:14,artist:"Belin",zone:"tafona",lat:43.48448,lng:-8.22782,large:!0},{number:15,artist:"Luis Rapela",zone:"tafona",lat:43.48435,lng:-8.22714,large:!0}
1258,{number:16,artist:"Diego As",zone:"tafona",lat:43.48312,lng:-8.22812,large:!1},{number:17,artist:"Rojo",zone:"tafona",lat:43.48385,lng:-8.22448,large:!1},{number:18,artist:"Sergio Ayala",zone:"tafona",lat:43.48365,lng:-8.22322,large:!0},{number:19,artist:"Vuelco",zone:"tafona",lat:43.48298,lng:-8.22155,large:!1},{number:20,artist:"Isabella Fox",zone:"tafona",lat:43.48432,lng:-8.22008,large:!0},{number:21,artist:"Suso33",zone:"tafona",lat:43.48622,lng:-8.23055,large:!0,note:"Itinerante — roaming installation"}],zJ={lat:43.4862,lng:-8.2225},zS="meninas-tour-2026-location-consent",t2="meninas-tour-2026-device-id",OS="slant-campaign-location-consent",u1="slant-campaign-location-device-id";function OJ(){try{return localStorage.getItem(zS)==="granted"}catch{return!1}}function P_(){try{return localStorage.getItem(OS)==="granted"||localStorage.getItem(zS)==="granted"}catch{return!1}}function FJ(){try{localStorage.setItem(zS,"granted"),localStorage.setItem(OS,"granted")}catch{}}function jJ(){try{localStorage.setItem(OS,"granted")}catch{}}function NJ(){try{const e=localStorage.getItem(t2);if(e)return e;const r=`ferrol-${crypto.randomUUID()}`;return localStorage.setItem(t2,r),r}catch{return`ferrol-session-${crypto.randomUUID()}`}}function NI(){try{const e=localStorage.getItem(u1)||localStorage.getItem(t2);if(e)return localStorage.setItem(u1,e),e;const r=`slant-${crypto.randomUUID()}`;return localStorage.setItem(u1,r),r}catch{return`slant-session-${crypto.randomUUID()}`}}const f$=6e4,TL=R.createContext(null);function m$({children:e}){const{user:r,isAuthenticated:s}=Na(),u=R.useRef(!1),m=R.useRef(null),[x,v]=R.useState(!1),[c,A]=R.useState(null),[L,z]=R.useState(null),[j,V]=R.useState(!1),[Z,K]=R.useState(null),[Y,ie]=R.useState([]),[Q,G]=R.useState([]),[J,ue]=R.useState(!1);R.useEffect(()=>{u.current||fetch("/api/config/client-keys").then(De=>De.json()).then(De=>{const Ze=De==null?void 0:De.radarPublishableKey;if(!Ze){console.warn("[Radar] Radar publishable key not configured on server");return}try{El.initialize(Ze),u.current=!0,v(!0),z(null),console.log("[Radar] SDK initialized successfully")}catch(We){const Ae=We instanceof Error?We.message:"Failed to initialize Radar";z(Ae),console.error("[Radar] Initialization failed:",We)}}).catch(De=>{console.error("[Radar] Failed to fetch publishable key:",De)})},[]),R.useEffect(()=>{if(!(!x||!s||!(r!=null&&r.id)))try{El.setUserId(r.id),console.log("[Radar] User ID set:",r.id),r.email&&El.setMetadata({email:r.email,firstName:r.firstName||"",lastName:r.lastName||"",role:r.role||"user"})}catch(De){console.error("[Radar] Failed to set user:",De)}},[x,s,r==null?void 0:r.id,r==null?void 0:r.email,r==null?void 0:r.firstName,r==null?void 0:r.lastName,r==null?void 0:r.role]);const ce=R.useCallback(async(De,Ze,We)=>{if(!De||De.length===0)return;const Ae=De.filter(Pe=>Pe.type==="user.entered_geofence"||Pe.type==="user.exited_geofence"||Pe.type==="user.dwelled_in_geofence");if(Ae.length!==0)try{const Ke=P_()||!(r!=null&&r.id)?NI():void 0,ot=await fetch("/api/qr-registry/geofence-event",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({events:Ae,latitude:Ze,longitude:We,userId:r==null?void 0:r.id,...Ke?{deviceFingerprint:Ke}:{}})});if(ot.ok){const ze=await ot.json();console.log(`[Radar] Relayed ${ze.processed} geofence event(s) to server`)}}catch(Pe){console.warn("[Radar] Failed to relay geofence events:",Pe)}},[r==null?void 0:r.id]),xe=R.useCallback(async(De,Ze,We)=>{var Ae;try{const Ke=P_()||!(r!=null&&r.id)?NI():void 0,ot=await fetch("/api/qr-registry/track-location",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({latitude:De,longitude:Ze,accuracy:We,userId:r==null?void 0:r.id,...Ke?{deviceFingerprint:Ke}:{}})});if(ot.ok){const ze=await ot.json();if(ze.geofences&&ze.geofences.length>0){const Je=ze.geofences.map(mt=>mt.description||mt.id);G(Je),console.log(`[Radar] Server-side: inside ${ze.geofences.length} geofence(s)`)}ze.events&&ze.events.length>0&&console.log(`[Radar] Server-side: ${ze.events.length} event(s) triggered`),(Ae=ze.recordedEvents)!=null&&Ae.length&&console.log("[Radar] recordedEvents:",ze.recordedEvents)}if(J){const ze=await Rh("POST",`/api/chains/${jI}/location`,{latitude:De,longitude:Ze,accuracy:We??null});ze.ok||console.warn("[Radar] Ferrol member location relay failed:",ze.status)}}catch(Pe){console.warn("[Radar] Server-side track failed:",Pe)}},[J,r==null?void 0:r.id]);R.useEffect(()=>{if(!s){ue(!1);return}let De=!1;const Ze=async()=>{try{const Ae=await fetch(`/api/chains/${jI}/location-progress`,{credentials:"include"});De||ue(Ae.ok)}catch{De||ue(!1)}};Ze();const We=window.setInterval(Ze,3e4);return()=>{De=!0,window.clearInterval(We)}},[s,r==null?void 0:r.id]);const Re=R.useCallback(async()=>{var Ze;let De=null;if(u.current)try{console.log("[Radar] Attempting SDK trackOnce...");const We=await El.trackOnce(),Ae=new Date;We.location?(De=We.location,A(We.location),console.log("[Radar] Location captured via SDK:",De.latitude,De.longitude)):console.warn("[Radar] SDK trackOnce returned no location"),K(Ae),z(null);const Pe=We.events;if(Pe&&Pe.length>0){console.log(`[Radar] ${Pe.length} geofence event(s) detected:`,Pe.map(Je=>Je.type)),ie(Je=>[...Pe,...Je].slice(0,50)),ce(Pe,De==null?void 0:De.latitude,De==null?void 0:De.longitude);const ot=Pe.filter(Je=>Je.type==="user.entered_geofence"&&Je.geofence).map(Je=>Je.geofence.description||Je.geofence.externalId||Je.geofence._id),ze=Pe.filter(Je=>Je.type==="user.exited_geofence"&&Je.geofence).map(Je=>Je.geofence.externalId||Je.geofence._id);ot.length>0&&G(Je=>Array.from(new Set([...Je,...ot]))),ze.length>0&&G(Je=>Je.filter(mt=>!ze.includes(mt)))}const Ke=(Ze=We.user)==null?void 0:Ze.geofences;if(Ke&&Array.isArray(Ke)){const ot=Ke.map(ze=>ze.description||ze.externalId||ze._id);G(ot)}}catch(We){const Ae=We instanceof Error?We.message:"Tracking failed";z(Ae),console.warn("[Radar] Client SDK track failed, falling back to native geolocation:",Ae)}if(!De)try{console.log("[Radar] Falling back to native geolocation...");const We=await new Promise((Ae,Pe)=>{navigator.geolocation.getCurrentPosition(Ae,Pe,{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})});De={latitude:We.coords.latitude,longitude:We.coords.longitude,accuracy:We.coords.accuracy},console.log("[Radar] Native location captured:",De.latitude,De.longitude),A(De),K(new Date),z(null)}catch(We){const Ae=We instanceof Error?We.message:"Location unavailable";return z(Ae),console.warn("[Radar] Native geolocation failed:",Ae),{location:null,user:null,events:[]}}return De&&await xe(De.latitude,De.longitude,De.accuracy),{location:De,user:null,events:[]}},[xe,ce]),Ce=R.useCallback(async()=>await Re()||{location:null,user:null,events:[]},[Re]),re=R.useCallback((De=f$)=>{m.current&&clearInterval(m.current),console.log(`[Radar] Starting foreground tracking (interval: ${De/1e3}s)`),V(!0),Re(),m.current=setInterval(()=>{Re()},De)},[Re]),se=R.useCallback(()=>{m.current&&(clearInterval(m.current),m.current=null),V(!1),console.log("[Radar] Foreground tracking stopped")},[]);R.useEffect(()=>((s&&(r!=null&&r.id)||P_())&&re(),()=>{m.current&&(clearInterval(m.current),m.current=null)}),[s,r==null?void 0:r.id,re]),R.useEffect(()=>{const De=()=>{P_()&&!m.current&&re()};De();const Ze=window.setInterval(De,5e3);return()=>window.clearInterval(Ze)},[re]);const ve=async De=>{if(!x)throw new Error("Radar not initialized");return(await El.searchPlaces(De)).places||[]},Me=async(De,Ze)=>{if(!x)throw new Error("Radar not initialized");return(await El.autocomplete({query:De,...Ze})).addresses||[]},qe=async De=>{if(!x)throw new Error("Radar not initialized");return(await El.forwardGeocode({query:De})).addresses||[]},$e=async De=>{if(!x)throw new Error("Radar not initialized");return(await El.reverseGeocode(De)).addresses||[]};return M.jsx(TL.Provider,{value:{initialized:x,userId:(r==null?void 0:r.id)||null,location:c,error:L,tracking:j,lastTrackTime:Z,geofenceEvents:Y,nearbyGeofences:Q,startForegroundTracking:re,stopForegroundTracking:se,trackOnce:Ce,searchPlaces:ve,autocomplete:Me,forwardGeocode:qe,reverseGeocode:$e},children:e})}function g$(){const e=R.useContext(TL);if(!e)throw new Error("useRadarContext must be used within a RadarProvider");return e}const y$={id:"hub",label:"All",description:"Full platform access",icon:ic,color:"from-slate-500 to-slate-700",promptPlaceholder:"Create a campaign, plan an event, track attribution...",intentChips:[{label:"Create a Campaign",icon:ro,route:"/campaigns/create",keywords:["campaign","advertise","promote","launch"]},{label:"Plan an Event",icon:kh,route:"/events/create",keywords:["event","plan","conference","festival"]},{label:"Creator Studio",icon:Ms,route:"/creator-studio",keywords:["creator","content","video","studio"]},{label:"Track Attribution",icon:ln,route:"/reports",keywords:["track","attribution","analytics","report","kpi"]},{label:"Plan a Trip",icon:ec,route:"/trips/new",keywords:["book","travel","flight","hotel","trip","plan","itinerary"]},{label:"Build a Chain",icon:wo,route:"/chains",keywords:["chain","slant chain"]}],quickActions:[{label:"Campaigns",description:"Build & manage activation campaigns",icon:ro,route:"/campaigns/create",color:"from-orange-500 to-red-500"},{label:"Events",description:"Create and manage live events",icon:kh,route:"/events",color:"from-blue-500 to-cyan-500"},{label:"Creator Studio",description:"Content creation & distribution",icon:Ms,route:"/creator-studio",color:"from-purple-500 to-pink-500"},{label:"Reports",description:"Attribution & KPI analytics",icon:ln,route:"/reports",color:"from-emerald-500 to-teal-500"},{label:"Plan a Trip",description:"AI itinerary builder for your next trip",icon:ec,route:"/trips/new",color:"from-
1258amber-500 to-yellow-500"},{label:"Chains",description:"Connected travel narratives",icon:wo,route:"/chains",color:"from-indigo-500 to-violet-500"}],tools:[{label:"QR Studio",icon:_i,route:"/influencer-qr-studio"},{label:"Geofences",icon:vn,route:"/geofences"},{label:"Presale",icon:$l,route:"/presale"},{label:"Telemetry",icon:pc,route:"/telemetry"},{label:"Connectors",icon:Yo,route:"/connector-dashboard"},{label:"Dashboard",icon:mp,route:"/dashboard"}],bottomNav:[{name:"Home",href:"/",icon:ic},{name:"Campaigns",href:"/campaigns/create",icon:ro},{name:"Create",href:"/creator-studio",icon:Fu,isCreate:!0},{name:"Studio",href:"/creator-studio",icon:Ms},{name:"Reports",href:"/reports",icon:ln}]},_$={id:"discovery",label:"Discovery",description:"Explore locations & social",icon:fm,color:"from-cyan-500 to-blue-500",promptPlaceholder:"Find nearby restaurants, explore a city, share a location...",intentChips:[{label:"Explore Nearby",icon:fm,route:"/discover",keywords:["explore","nearby","around me","discover"]},{label:"Find Places",icon:vn,route:"/discover",keywords:["find","places","restaurant","cafe","bar"]},{label:"Plan a Route",icon:Zm,route:"/routes/new",keywords:["route","plan","itinerary","directions"]},{label:"Share Location",icon:$8,route:"/creator-studio",keywords:["share","social","post","story"]},{label:"Save a Spot",icon:Kb,route:"/discover",keywords:["save","bookmark","favorite"]}],quickActions:[{label:"Explore Nearby",description:"Discover places around you",icon:fm,route:"/discover",color:"from-cyan-500 to-blue-500"},{label:"Plan Route",description:"Build your travel itinerary",icon:Zm,route:"/routes/new",color:"from-green-500 to-emerald-500"},{label:"Social Post",description:"Share to social channels",icon:Ms,route:"/creator-studio",color:"from-purple-500 to-pink-500"},{label:"Saved Places",description:"Your bookmarked spots",icon:Kb,route:"/discover",color:"from-amber-500 to-yellow-500"}],tools:[{label:"Geofences",icon:vn,route:"/geofences"},{label:"QR Studio",icon:_i,route:"/influencer-qr-studio"},{label:"Chains",icon:wo,route:"/chains"},{label:"Dashboard",icon:mp,route:"/dashboard"}],bottomNav:[{name:"Home",href:"/",icon:ic},{name:"Explore",href:"/discover",icon:fm},{name:"Route",href:"/routes/new",icon:Fu,isCreate:!0},{name:"Social",href:"/creator-studio",icon:Ms},{name:"Saved",href:"/discover",icon:Kb}]},v$={id:"theme_park",label:"Park Mode",description:"Theme park & group travel",icon:xS,color:"from-violet-500 to-purple-600",promptPlaceholder:"Book group travel, find best next move, check wait times...",intentChips:[{label:"Book Group Travel",icon:ec,route:"/routes/new",keywords:["book","group","travel","flight","hotel"]},{label:"Best Next Move",icon:ev,route:"/discover",keywords:["best","next","move","what","now","suggest"]},{label:"Park Map",icon:Zm,route:"/discover",keywords:["map","park","navigate","directions"]},{label:"Group Check-in",icon:ED,route:"/chains",keywords:["check","group","arrive","here"]},{label:"Nearby Offers",icon:Xb,route:"/presale",keywords:["offers","deals","discount","food","merch"]}],quickActions:[{label:"Group Travel",description:"Book flights & hotels for your group",icon:ec,route:"/routes/new",color:"from-violet-500 to-purple-600"},{label:"Best Next Move",description:"AI-powered park navigation",icon:ev,route:"/discover",color:"from-amber-500 to-orange-500"},{label:"Group Chain",description:"Track your group's journey",icon:wo,route:"/chains",color:"from-blue-500 to-cyan-500"},{label:"Offers & Merch",description:"Nearby deals & merchandise",icon:Xb,route:"/presale",color:"from-green-500 to-emerald-500"},{label:"Check-in",description:"Verify arrival at locations",icon:vn,route:"/geofences",color:"from-pink-500 to-rose-500"},{label:"Reports",description:"Trip analytics & spending",icon:ln,route:"/reports",color:"from-slate-500 to-gray-600"}],tools:[{label:"QR Scan",icon:_i,route:"/influencer-qr-studio"},{label:"Geofences",icon:vn,route:"/geofences"},{label:"Presale",icon:$l,route:"/presale"},{label:"Telemetry",icon:pc,route:"/telemetry"},{label:"Connectors",icon:Yo,route:"/connector-dashboard"},{label:"Dashboard",icon:mp,route:"/dashboard"}],bottomNav:[{name:"Home",href:"/",icon:ic},{name:"Travel",href:"/routes/new",icon:ec},{name:"Move",href:"/discover",icon:ev,isCreate:!0},{name:"Chain",href:"/chains",icon:wo},{name:"Offers",href:"/presale",icon:Xb}]},x$={id:"sports",label:"Sports",description:"Game day & team travel",icon:f0,c
1258olor:"from-red-500 to-orange-500",promptPlaceholder:"Set up game day, manage team travel, track fan engagement...",intentChips:[{label:"Game Day Campaign",icon:ro,route:"/campaigns/create",keywords:["game","campaign","gameday","activate"]},{label:"Team Travel",icon:ec,route:"/routes/new",keywords:["team","travel","book","flight","hotel"]},{label:"Fan Chain",icon:wo,route:"/chains",keywords:["fan","chain","roster","follow"]},{label:"Venue Check-in",icon:vn,route:"/geofences",keywords:["venue","stadium","arena","check"]},{label:"Live KPIs",icon:ln,route:"/reports",keywords:["live","kpi","analytics","report","score"]}],quickActions:[{label:"Game Day",description:"Launch game day campaigns",icon:ro,route:"/campaigns/create",color:"from-red-500 to-orange-500"},{label:"Team Travel",description:"Book & manage team travel",icon:ec,route:"/routes/new",color:"from-blue-500 to-cyan-500"},{label:"Fan Chain",description:"Fan engagement narratives",icon:wo,route:"/chains",color:"from-purple-500 to-pink-500"},{label:"Live Reports",description:"Real-time event analytics",icon:ln,route:"/reports",color:"from-emerald-500 to-teal-500"},{label:"QR Distribution",description:"Stadium QR & wristbands",icon:_i,route:"/influencer-qr-studio",color:"from-amber-500 to-yellow-500"},{label:"Venue Zones",description:"Manage geofenced areas",icon:vn,route:"/geofences",color:"from-indigo-500 to-violet-500"}],tools:[{label:"QR Studio",icon:_i,route:"/influencer-qr-studio"},{label:"Geofences",icon:vn,route:"/geofences"},{label:"Presale",icon:$l,route:"/presale"},{label:"Telemetry",icon:pc,route:"/telemetry"},{label:"Connectors",icon:Yo,route:"/connector-dashboard"},{label:"Dashboard",icon:mp,route:"/dashboard"}],bottomNav:[{name:"Home",href:"/",icon:ic},{name:"Game Day",href:"/campaigns/create",icon:ro},{name:"Create",href:"/influencer-qr-studio",icon:Fu,isCreate:!0},{name:"Chains",href:"/chains",icon:wo},{name:"Reports",href:"/reports",icon:ln}]},b$={id:"brand_launch",label:"Brand",description:"Product launch & activation",icon:X8,color:"from-emerald-500 to-teal-500",promptPlaceholder:"Launch a product, track store visits, manage presale...",intentChips:[{label:"Launch Campaign",icon:ro,route:"/campaigns/create",keywords:["launch","campaign","product","activate"]},{label:"Store Tracking",icon:vn,route:"/geofences",keywords:["store","track","visit","foot traffic"]},{label:"Presale Offers",icon:$l,route:"/presale",keywords:["presale","offer","deal","promotion"]},{label:"Creator Collab",icon:Yo,route:"/connector-dashboard",keywords:["creator","influencer","collab","partner"]},{label:"Attribution",icon:ln,route:"/reports",keywords:["attribution","report","kpi","roi"]}],quickActions:[{label:"Campaigns",description:"Product launch campaigns",icon:ro,route:"/campaigns/create",color:"from-emerald-500 to-teal-500"},{label:"Presale",description:"Manage offers & presale",icon:$l,route:"/presale",color:"from-orange-500 to-red-500"},{label:"Store Zones",description:"Geofence retail locations",icon:vn,route:"/geofences",color:"from-blue-500 to-cyan-500"},{label:"Attribution",description:"ROI & conversion analytics",icon:ln,route:"/reports",color:"from-purple-500 to-pink-500"},{label:"QR Studio",description:"Product & shelf QR codes",icon:_i,route:"/influencer-qr-studio",color:"from-amber-500 to-yellow-500"},{label:"Creators",description:"Influencer partnerships",icon:Yo,route:"/connector-dashboard",color:"from-indigo-500 to-violet-500"}],tools:[{label:"QR Studio",icon:_i,route:"/influencer-qr-studio"},{label:"Geofences",icon:vn,route:"/geofences"},{label:"Presale",icon:$l,route:"/presale"},{label:"Telemetry",icon:pc,route:"/telemetry"},{label:"Connectors",icon:Yo,route:"/connector-dashboard"},{label:"Dashboard",icon:mp,route:"/dashboard"}],bottomNav:[{name:"Home",href:"/",icon:ic},{name:"Launch",href:"/campaigns/create",icon:ro},{name:"Create",href:"/influencer-qr-studio",icon:Fu,isCreate:!0},{name:"Presale",href:"/presale",icon:$l},{name:"Reports",href:"/reports",icon:ln}]},w$={id:"creator",label:"Creator",description:"Content & social distribution",icon:Ms,color:"from-pink-500 to-rose-500",promptPlaceholder:"Create content, schedule posts, check analytics...",intentChips:[{label:"Creator Studio",icon:Ms,route:"/creator-studio",keywords:["create","content","video","studio","edit"]},{label:"Schedule Post",icon:kh,route:"/creator-studio",keywords:["schedule","post","publish","social"]},{label:"My QR Codes",icon:_i,route:"/influencer-qr-studio",keywords:["qr","code","link","scan"]},{label:"Analytics",icon:ln,route:"/reports",keywords:["analytics","views","engagement","performance"]},{label:"My Chains",icon:wo,route:"/chains",keywords:["chain","narrative","story","journey"]}],quickActions:[{label:"Creator Studio",description:"Full content creation suite",icon:Ms,route:"/creator-studio",color:"from-pink-500 to-rose-500"},{label:"QR Codes",description:"Create & manage your QR codes",icon:_i,route:"/influencer-qr-studio",color:"from-violet-500 to-purple-500"},{label:"My Chains",description:"Your travel narratives",icon:wo,route:"/chains",color:"from-blue-500 to-cyan-500"},{label:"Analytics",description:"Content performance metrics",icon:ln,route:"/reports",color:"from-emerald-500 to-teal-500"}],tools:[{label:"Geofences",icon:vn,route:"/geofences"},{label:"Connectors",icon:Yo,route:"/connector-dashboard"},{label:"Dashboard",icon:mp,route:"/dashboard"},{label:"Telemetry",icon:pc,route:"/telemetry"}],bottomNav:[{name:"Home",href:"/",icon:ic},{name:"Studio",href:"/creator-studio",icon:Ms},{name:"Create",href:"/creator-studio",icon:Fu,isCreate:!0},{name:"QR",href:"/influencer-qr-studio",icon:_i},{name:"Analytics",href:"/reports",icon:ln}]},S$={id:"event_host",label:"Event Host",description:"Event management & check-ins",icon:J_,color:"from-
1258amber-500 to-orange-600",promptPlaceholder:"Create an event, scan check-ins, view attendance reports...",intentChips:[{label:"Create Event",icon:kh,route:"/events/create",keywords:["create","event","new","plan","setup"]},{label:"My Events",icon:J_,route:"/event-host",keywords:["my","events","list","manage","upcoming"]},{label:"Scan Check-ins",icon:Hb,route:"/events/scanner",keywords:["scan","check","checkin","arrive","door"]},{label:"Event Reports",icon:ln,route:"/reports",keywords:["report","analytics","attendance","kpi","stats"]},{label:"QR Tickets",icon:_i,route:"/influencer-qr-studio",keywords:["qr","ticket","code","badge","pass"]},{label:"Venue Zones",icon:vn,route:"/geofences",keywords:["venue","zone","geofence","area","location"]}],quickActions:[{label:"Create Event",description:"Set up a new social or educational event",icon:kh,route:"/events/create",color:"from-amber-500 to-orange-600"},{label:"Scan Check-ins",description:"QR check-in scanner at the door",icon:Hb,route:"/events/scanner",color:"from-green-500 to-emerald-500"},{label:"Event Reports",description:"Attendance & attribution analytics",icon:ln,route:"/reports",color:"from-blue-500 to-cyan-500"},{label:"QR Tickets",description:"Generate & distribute QR tickets",icon:_i,route:"/influencer-qr-studio",color:"from-violet-500 to-purple-500"},{label:"Attendees",description:"Manage registrations & guests",icon:Wm,route:"/event-host",color:"from-pink-500 to-rose-500"},{label:"Venue Zones",description:"Set up geofenced venue areas",icon:vn,route:"/geofences",color:"from-teal-500 to-cyan-500"}],tools:[{label:"QR Studio",icon:_i,route:"/influencer-qr-studio"},{label:"Geofences",icon:vn,route:"/geofences"},{label:"Chains",icon:wo,route:"/chains"},{label:"Telemetry",icon:pc,route:"/telemetry"},{label:"Connectors",icon:Yo,route:"/connector-dashboard"},{label:"Presale",icon:$l,route:"/presale"}],bottomNav:[{name:"Home",href:"/event-host",icon:J_},{name:"Events",href:"/events",icon:kh},{name:"Create",href:"/events/create",icon:Fu,isCreate:!0},{name:"Scan",href:"/events/scanner",icon:Hb},{name:"Reports",href:"/reports",icon:ln}]},BI={hub:y$,discovery:_$,theme_park:v$,sports:x$,brand_launch:b$,creator:w$,event_host:S$},BJ=["hub","discovery","theme_park","sports","brand_launch","creator","event_host"];function EL(e){return BI[e]||BI.hub}function VJ(e,r){const s=e.toLowerCase().trim();if(!s)return null;const u=EL(r);for(const m of u.intentChips)for(const x of m.keywords)if(s.includes(x))return m.route;return s.includes("travel")||s.includes("trip")||s.includes("route")?"/routes/new":s.includes("qr")?"/influencer-qr-studio":s.includes("geofence")||s.includes("location")?"/geofences":s.includes("presale")?"/presale":s.includes("demo")?"/demo/nfl-madrid":null}const PL=R.createContext(null),d1="slant-mode",T$=["hub","discovery","theme_park","sports","brand_launch","creator","event_host"];function h1(e){return!!e&&T$.includes(e)}function E$({children:e}){const[r,s]=R.useState(()=>{try{const v=localStorage.getItem(d1);if(h1(v))return v}catch{}return"hub"}),u=R.useRef((()=>{try{return h1(localStorage.getItem(d1))}catch{return!1}})());R.useEffect(()=>{try{localStorage.setItem(d1,r)}catch{}},[r]),R.useEffect(()=>{u.current||fetch("/api/users/me/preferred-mode",{credentials:"include"}).then(v=>v.ok?v.json():null).then(v=>{v&&h1(v.preferredMode)&&s(v.preferredMode)}).catch(()=>{})},[]);const m=v=>{s(v),fetch("/api/user/profile",{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferredMode:v})}).catch(c=>console.warn("[useMode] Failed to persist preferredMode:",c))},x=EL(r);return M.jsx(PL.Provider,{value:{mode:r,setMode:m,config:x},children:e})}function P$(){const e=R.useContext(PL);if(!e)throw new Error("useMode must be used within a ModeProvider");return e}const C$=hg("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),sn=R.forwardRef(({className:e,variant:r,size:s,asChild:u=!1,...m},x)=>{const v=u?fp:"button";return M.jsx(v,{className:it(C$({variant:r,size:s,className:e})),ref:x,...m})});sn.displayName="Button";function I$({isOpen:e,onClose:r}){const{user:s}=Na(),u=()=>{rB().finally(()=>{window.location.href="/api/logout"})};return e?M.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",onClick:r,children:M.jsxs("div",{className:"bg-card rounded-lg w-full max-w-md",onClick:m=>m.stopPropagation(),children:[M.jsx("div",{className:"p-4 border-b border-border",children:M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("h3",{className:"text-lg font-semibold",children:"Account Settings"}),M.jsx(sn,{variant:"ghost",size:"sm",onClick:r,"data-testid":"button-close-user-modal",children:M.jsx(pg,{className:"h-4 w-4"})})]})}),M.jsxs("div",{className:"p-4 space-y-4",children:[M.jsxs("div",{className:"text-center",children:[M.jsx("img",{src:(s==null?void 0:s.profileImageUrl)||"https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-4.0.3&auto=format&fit=crop&w=100&h=100&q=80",alt:"User profile",className:"w-20 h-20 rounded-full object-cover mx-auto mb-3","data-testid":"img-user-profile"}),M.jsx("h4",{className:"font-medium","data-testid":"text-user-display-name",children:s!=null&&s.firstName&&(s!=null&&s.lastName)?`${s.firstName} ${s.lastName}`:(s==null?void 0:s.email)||"User"}),M.jsx("p",{className:"text-sm text-muted-foreground","data-testid":"text-user-email-display",children:(s==null?void 0:s.email)||"[email protected]"})]}),M.jsxs("div",{className:"space-y-2",children:[M.jsx(hu,{href:"/settings/profile",onClick:r,children:M.jsxs(sn,{variant:"ghost",className:"w-full justify-start","data-testid":"button-profile-settings",children:[M.jsx(PD,{className:"h-4 w-4 mr-3"}),"Profile Settings"]})}),M.jsxs(sn,{variant:"ghost",className:"w-full justify-start",disabled:!0,"data-testid":"button-notifications",children:[M.jsx(Q_,{className:"h-4 w-4 mr-3"}),"Notifications"]}),M.jsx(hu,{href:"/privacy",onClick:r,children:M.jsxs(sn,{variant:"ghost",className:"w-full justify-start","data-testid":"button-privacy-security",children:[M.jsx(H8,{className:"h-4 w-4 mr-3"}),"Privacy & Data"]})}),M.jsxs(sn,{variant:"ghost",className:"w-full justify-start",disabled:!0,"data-testid":"button-theme-preferences",children:[M.jsx(Ms,{className:"h-4 w-4 mr-3"}),"Theme Preferences"]}),M.jsx("hr",{className:"border-border"}),M.jsxs(sn,{variant:"ghost",className:"w-full justify-start text-destructive hover:text-destructive hover:bg-destructive/10",onClick:u,"data-testid":"button-sign-out",children:[M.jsx(B8,{className:"h-4 w-4 mr-3"}),"Sign Out"]})]})]})]})}):null}function M$(){const[e,r]=R.useState(()=>typeof navigator<"u"?navigator.onLine:!0),[s,u]=R.useState("online"),[m,x]=R.useState(0),[v,c]=R.use
1258State(null),A=R.useCallback(async()=>{try{const z=await Bk();x(z),e?hB()?u("syncing"):z>0?u("pending"):u("online"):u("offline")}catch(z){console.error("Failed to get pending count:",z)}},[e]);R.useEffect(()=>{const z=()=>{r(!0),A()},j=()=>{r(!1),u("offline")};window.addEventListener("online",z),window.addEventListener("offline",j);const V=dB((K,Y)=>{K?u("syncing"):(Y&&c(Y),A())});A();const Z=setInterval(A,5e3);return()=>{window.removeEventListener("online",z),window.removeEventListener("offline",j),V(),clearInterval(Z)}},[A]);const L=R.useCallback(async()=>{if(e){u("syncing");try{const z=await Lv();c(z)}catch(z){console.error("Manual sync failed:",z)}await A()}},[e,A]);return{isOnline:e,syncStatus:s,pendingCount:m,lastSyncResult:v,triggerManualSync:L}}function A$({className:e}){const{syncStatus:r,pendingCount:s,lastSyncResult:u}=M$();return r==="online"&&s===0?null:M.jsxs("div",{className:it("fixed bottom-20 md:bottom-4 left-1/2 -translate-x-1/2 z-50","px-4 py-2 rounded-full shadow-lg","bg-background/95 backdrop-blur border","flex items-center gap-2 text-sm",e),"data-testid":"sync-status-indicator",children:[r==="offline"&&M.jsxs(M.Fragment,{children:[M.jsx(iV,{className:"w-4 h-4 text-amber-500"}),M.jsx("span",{children:"You're offline. Changes will sync when reconnected."})]}),r==="syncing"&&M.jsxs(M.Fragment,{children:[M.jsx(wD,{className:"w-4 h-4 text-blue-500 animate-spin"}),M.jsx("span",{children:"Syncing changes..."})]}),r==="pending"&&M.jsxs(M.Fragment,{children:[M.jsx(R8,{className:"w-4 h-4 text-orange-500"}),M.jsxs("span",{children:[s," change",s!==1?"s":""," pending"]})]}),u&&u.success>0&&r==="online"&&M.jsxs(M.Fragment,{children:[M.jsx(yD,{className:"w-4 h-4 text-green-500"}),M.jsx("span",{children:"All changes saved"})]})]})}var R$=R.createContext(void 0);function FS(e){const r=R.useContext(R$);return e||r||"ltr"}var C_=0,ws=null;function CL(){R.useEffect(()=>{ws||(ws={start:VI(),end:VI()});const{start:e,end:r}=ws;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==r&&document.body.insertAdjacentElement("beforeend",r),C_++,()=>{C_===1&&(ws==null||ws.start.remove(),ws==null||ws.end.remove(),ws=null),C_=Math.max(0,C_-1)}},[])}function VI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var p1="focusScope.autoFocusOnMount",f1="focusScope.autoFocusOnUnmount",UI={bubbles:!1,cancelable:!0},k$="FocusScope",jS=R.forwardRef((e,r)=>{const{loop:s=!1,trapped:u=!1,onMountAutoFocus:m,onUnmountAutoFocus:x,...v}=e,[c,A]=R.useState(null),L=Kr(m),z=Kr(x),j=R.useRef(null),V=fr(r,Y=>A(Y)),Z=R.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R.useEffect(()=>{if(u){let Y=function(J){if(Z.paused||!c)return;const ue=J.target;c.contains(ue)?j.current=ue:Cl(j.current,{select:!0})},ie=function(J){if(Z.paused||!c)return;const ue=J.relatedTarget;ue!==null&&(c.contains(ue)||Cl(j.current,{select:!0}))},Q=function(J){if(document.activeElement===document.body)for(const ce of J)ce.removedNodes.length>0&&Cl(c)};document.addEventListener("focusin",Y),document.addEventListener("focusout",ie);const G=new MutationObserver(Q);return c&&G.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",Y),document.removeEventListener("focusout",ie),G.disconnect()}}},[u,c,Z.paused]),R.useEffect(()=>{if(c){GI.add(Z);const Y=document.activeElement;if(!c.contains(Y)){const Q=new CustomEvent(p1,UI);c.addEventListener(p1,L),c.dispatchEvent(Q),Q.defaultPrevented||(D$(j$(IL(c)),{select:!0}),document.activeElement===Y&&Cl(c))}return()=>{c.removeEventListener(p1,L),setTimeout(()=>{const Q=new CustomEvent(f1,UI);c.addEventListener(f1,z),c.dispatchEvent(Q),Q.defaultPrevented||Cl(Y??document.body,{select:!0}),c.removeEventListener(f1,z),GI.remove(Z)},0)}}},[c,L,z,Z]);const K=R.useCallback(Y=>{if(!s&&!u||Z.paused)return;const ie=Y.key==="Tab"&&!Y.altKey&&!Y.ctrlKey&&!Y.metaKey,Q=document.activeElement;if(ie&&Q){const G=Y.currentTarget,[J,ue]=L$(G);J&&ue?!Y.shiftKey&&Q===ue?(Y.preventDefault(),s&&Cl(J,{select:!0})):Y.shiftKey&&Q===J&&(Y.preventDefault(),s&&Cl(ue,{select:!0})):Q===G&&Y.preventDefault()}},[s,u,Z.paused]);return M.jsx(kt.div,{tabIndex:-1,...v,ref:V,onKeyDown:K})});jS.displayName=k$;function D$(e,{select:r=!1}={}){const s=document.activeElement;for(const u of e)if(Cl(u,{select:r}),document.activeElement!==s)return}function L$(e){const r=IL(e),s=$I(r,e),u=$I(r.reverse(),e);return[s,u]}function IL(e){const r=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:u=>{const m=u.tagName==="INPUT"&&u.type==="hidden";return u.disabled||u.hidden||m?NodeFilter.FILTER_SKIP:u.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function $I(e,r){for(const s of e)if(!z$(s,{upTo:r}))return s}function z$(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function O$(e){return e instanceof HTMLInputElement&&"select"in e}function Cl(e,{select:r=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&O$(e)&&r&&e.select()}}var GI=F$();function F$(){let e=[];return{add(r){const s=e[0];r!==s&&(s==null||s.pause()),e=qI(e,r),e.unshift(r)},remove(r){var s;e=qI(e,r),(s=e[0])==null||s.resume()}}}function qI(e,r){const s=[...e],u=s.indexOf(r);return u!==-1&&s.splice(u,1),s}function j$(e){return e.filter(r=>r.tagName!=="A")}var m1="rovingFocusGroup.onEntryFocus",N$={bubbles:!1,cancelable:!0},gg="RovingFocusGroup",[r2,ML,B$]=fS(gg),[V$,AL]=zs(gg,[B$]),[U$,$$]=V$(gg),RL=R.forwardRef((e,r)=>M.jsx(r2.Provider,{scope:e.__scopeRovingFocusGroup,children:M.jsx(r2.Slot,{scope:e.__scopeRovingFocusGroup,children:M.jsx(G$,{...e,ref:r})})}));RL.displayName=gg;var G$=R.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,orientation:u,loop:m=!1,dir:x,currentTabStopId:v,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:A,onEntryFocus:L,preventScrollOnEntryFocus:z=!1,...j}=e,V=R.useRef(null),Z=fr(r,V),K=FS(x),[Y,ie]=ug({prop:v,defaultProp:c??null,onChange:A,caller:gg}),[Q,G]=R.useState(!1),J=Kr(L),ue=ML(s),ce=R.useRef(!1),[xe,Re]=R.useState(0);return R.useEffect(()=>{const Ce=V.current;if(Ce)return Ce.addEventListener(m1,J),()=>Ce.removeEventListener(m1,J)},[J]),M.jsx(U$,{scope:s,orientation:u,dir:K,loop:m,currentTabStopId:Y,onItemFocus:R.useCallback(Ce=>ie(Ce),[ie]),onItemShiftTab:R.useCallback(()=>G(!0),[]),onFocusableItemAdd:R.useCallback(()=>Re(Ce=>Ce+1),[]),onFocusableItemRemove:R.useCallback(()=>Re(Ce=>Ce-1),[]),children:M.jsx(kt.div,{tabIndex:Q||xe===0?-1:0,"data-orientation":u,...j,ref:Z,style:{outline:"none",...e.style},onMouseDown:xt(e.onMouseDown,()=>{ce.current=!0}
vendor: 4,287 bytes, line 1258
1258),onFocus:xt(e.onFocus,Ce=>{const re=!ce.current;if(Ce.target===Ce.currentTarget&&re&&!Q){const se=new CustomEvent(m1,N$);if(Ce.currentTarget.dispatchEvent(se),!se.defaultPrevented){const ve=ue().filter(Ze=>Ze.focusable),Me=ve.find(Ze=>Ze.active),qe=ve.find(Ze=>Ze.id===Y),De=[Me,qe,...ve].filter(Boolean).map(Ze=>Ze.ref.current);LL(De,z)}}ce.current=!1}),onBlur:xt(e.onBlur,()=>G(!1))})})}),kL="RovingFocusGroupItem",DL=R.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,focusable:u=!0,active:m=!1,tabStopId:x,children:v,...c}=e,A=no(),L=x||A,z=$$(kL,s),j=z.currentTabStopId===L,V=ML(s),{onFocusableItemAdd:Z,onFocusableItemRemove:K,currentTabStopId:Y}=z;return R.useEffect(()=>{if(u)return Z(),()=>K()},[u,Z,K]),M.jsx(r2.ItemSlot,{scope:s,id:L,focusable:u,active:m,children:M.jsx(kt.span,{tabIndex:j?0:-1,"data-orientation":z.orientation,...c,ref:r,onMouseDown:xt(e.onMouseDown,ie=>{u?z.onItemFocus(L):ie.preventDefault()}),onFocus:xt(e.onFocus,()=>z.onItemFocus(L)),onKeyDown:xt(e.onKeyDown,ie=>{if(ie.key==="Tab"&&ie.shiftKey){z.onItemShiftTab();return}if(ie.target!==ie.currentTarget)return;const Q=Z$(ie,z.orientation,z.dir);if(Q!==void 0){if(ie.metaKey||ie.ctrlKey||ie.altKey||ie.shiftKey)return;ie.preventDefault();let J=V().filter(ue=>ue.focusable).map(ue=>ue.ref.current);if(Q==="last")J.reverse();else if(Q==="prev"||Q==="next"){Q==="prev"&&J.reverse();const ue=J.indexOf(ie.currentTarget);J=z.loop?H$(J,ue+1):J.slice(ue+1)}setTimeout(()=>LL(J))}}),children:typeof v=="function"?v({isCurrentTabStop:j,hasTabStop:Y!=null}):v})})});DL.displayName=kL;var q$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function W$(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Z$(e,r,s){const u=W$(e.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(u))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(u)))return q$[u]}function LL(e,r=!1){const s=document.activeElement;for(const u of e)if(u===s||(u.focus({preventScroll:r}),document.activeElement!==s))return}function H$(e,r){return e.map((s,u)=>e[(r+u)%e.length])}var X$=RL,K$=DL,Y$=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},ah=new WeakMap,I_=new WeakMap,M_={},g1=0,zL=function(e){return e&&(e.host||zL(e.parentNode))},Q$=function(e,r){return r.map(function(s){if(e.contains(s))return s;var u=zL(s);return u&&e.contains(u)?u:(console.error("aria-hidden",s,"in not contained inside",e,". Doing nothing"),null)}).filter(function(s){return!!s})},J$=function(e,r,s,u){var m=Q$(r,Array.isArray(e)?e:[e]);M_[s]||(M_[s]=new WeakMap);var x=M_[s],v=[],c=new Set,A=new Set(m),L=function(j){!j||c.has(j)||(c.add(j),L(j.parentNode))};m.forEach(L);var z=function(j){!j||A.has(j)||Array.prototype.forEach.call(j.children,function(V){if(c.has(V))z(V);else try{var Z=V.getAttribute(u),K=Z!==null&&Z!=="false",Y=(ah.get(V)||0)+1,ie=(x.get(V)||0)+1;ah.set(V,Y),x.set(V,ie),v.push(V),Y===1&&K&&I_.set(V,!0),ie===1&&V.setAttribute(s,"true"),K||V.setAttribute(u,"true")}catch(Q){console.error("aria-hidden: cannot operate on ",V,Q)}})};return z(r),c.clear(),g1++,function(){v.forEach(function(j){var V=ah.get(j)-1,Z=x.get(j)-1;ah.set(j,V),x.set(j,Z),V||(I_.has(j)||j.removeAttribute(u),I_.delete(j)),Z||j.removeAttribute(s)}),g1--,g1||(ah=new WeakMap,ah=new WeakMap,I_=new WeakMap,M_={})}},OL=function(e,r,s){s===void 0&&(s="data-aria-hidden");var u=Array.from(Array.isArray(e)?e:[e]),m=Y$(e);return m?(u.push.apply(u,Array.from(m.querySelectorAll("[aria-live], script"))),J$(u,m,s,"aria-hidden")):function(){return null}},Is=function(){return Is=Object.assign||function(r){for(var s,u=1,m=arguments.length;u<m;u++){s=arguments[u];for(var x in s)Object.prototype.hasOwnProperty.call(s,x)&&(r[x]=s[x])}return r},Is.apply(this,arguments)};function FL(e,r){var s={};for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&r.indexOf(u)<0&&(s[u]=e[u]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var m=0,u=Object.getOwnPropertySymbols(e);m<u.length;m++)r.indexOf(u[m])<0&&Object.prototype.propertyIsEnumerable.call(e,u[m])&&(s[u[m]]=e[u[m]]);return s}function UJ(e,r,s,u){function m(x){return x instanceof s?x:new s(function(v){v(x)})}
vendor: 5,280 bytes, lines 1258-1273
1258return new(s||(s=Promise))(function(x,v){function c(z){try{L(u.next(z))}catch(j){v(j)}}function A(z){try{L(u.throw(z))}catch(j){v(j)}}function L(z){z.done?x(z.value):m(z.value).then(c,A)}L((u=u.apply(e,r||[])).next())})}function eG(e,r,s){if(s||arguments.length===2)for(var u=0,m=r.length,x;u<m;u++)(x||!(u in r))&&(x||(x=Array.prototype.slice.call(r,0,u)),x[u]=r[u]);return e.concat(x||Array.prototype.slice.call(r))}var iv="right-scroll-bar-position",ov="width-before-scroll-bar",tG="with-scroll-bars-hidden",rG="--removed-body-scroll-bar-size";function y1(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function nG(e,r){var s=R.useState(function(){return{value:e,callback:r,facade:{get current(){return s.value},set current(u){var m=s.value;m!==u&&(s.value=u,s.callback(u,m))}}}})[0];return s.callback=r,s.facade}var iG=typeof window<"u"?R.useLayoutEffect:R.useEffect,WI=new WeakMap;function oG(e,r){var s=nG(null,function(u){return e.forEach(function(m){return y1(m,u)})});return iG(function(){var u=WI.get(s);if(u){var m=new Set(u),x=new Set(e),v=s.current;m.forEach(function(c){x.has(c)||y1(c,null)}),x.forEach(function(c){m.has(c)||y1(c,v)})}WI.set(s,e)},[e]),s}function sG(e){return e}function aG(e,r){r===void 0&&(r=sG);var s=[],u=!1,m={read:function(){if(u)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:e},useMedium:function(x){var v=r(x,u);return s.push(v),function(){s=s.filter(function(c){return c!==v})}},assignSyncMedium:function(x){for(u=!0;s.length;){var v=s;s=[],v.forEach(x)}s={push:function(c){return x(c)},filter:function(){return s}}},assignMedium:function(x){u=!0;var v=[];if(s.length){var c=s;s=[],c.forEach(x),v=s}var A=function(){var z=v;v=[],z.forEach(x)},L=function(){return Promise.resolve().then(A)};L(),s={push:function(z){v.push(z),L()},filter:function(z){return v=v.filter(z),s}}}};return m}function lG(e){e===void 0&&(e={});var r=aG(null);return r.options=Is({async:!0,ssr:!1},e),r}var jL=function(e){var r=e.sideCar,s=FL(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var u=r.read();if(!u)throw new Error("Sidecar medium not found");return R.createElement(u,Is({},s))};jL.isSideCarExport=!0;function cG(e,r){return e.useMedium(r),jL}var NL=lG(),_1=function(){},S0=R.forwardRef(function(e,r){var s=R.useRef(null),u=R.useState({onScrollCapture:_1,onWheelCapture:_1,onTouchMoveCapture:_1}),m=u[0],x=u[1],v=e.forwardProps,c=e.children,A=e.className,L=e.removeScrollBar,z=e.enabled,j=e.shards,V=e.sideCar,Z=e.noRelative,K=e.noIsolation,Y=e.inert,ie=e.allowPinchZoom,Q=e.as,G=Q===void 0?"div":Q,J=e.gapMode,ue=FL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),ce=V,xe=oG([s,r]),Re=Is(Is({},ue),m);return R.createElement(R.Fragment,null,z&&R.createElement(ce,{sideCar:NL,removeScrollBar:L,shards:j,noRelative:Z,noIsolation:K,inert:Y,setCallbacks:x,allowPinchZoom:!!ie,lockRef:s,gapMode:J}),v?R.cloneElement(R.Children.only(c),Is(Is({},Re),{ref:xe})):R.createElement(G,Is({},Re,{className:A,ref:xe}),c))});S0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};S0.classNames={fullWidth:ov,zeroRight:iv};var uG=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=uG();return r&&e.setAttribute("nonce",r),e}function hG(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function pG(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var fG=function(){var e=0,r=null;return{add:function(s){e==0&&(r=dG())&&(hG(r,s),pG(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},mG=function(){var e=fG();return function(r,s){R.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&s])}},BL=function(){var e=mG(),r=function(s){var u=s.styles,m=s.dynamic;return e(u,m),null};return r},gG={left:0,top:0,right:0,gap:0},v1=function(e){return parseInt(e||"",10)||0},yG=function(e){var r=window.getComputedStyle(document.body),s=r[e==="padding"?"paddingLeft":"marginLeft"],u=r[e==="padding"?"paddingTop":"marginTop"],m=r[e==="padding"?"paddingRight":"marginRight"];return[v1(s),v1(u),v1(m)]},_G=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gG;var r=yG(e),s=document.documentElement.clientWidth,u=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,u-s+r[2]-r[0])}},vG=BL(),Oh="data-scroll-locked",xG=function(e,r,s,u){var m=e.left,x=e.top,v=e.right,c=e.gap;return s===void 0&&(s="margin"),`
1259  .`.concat(tG,` {
1260   overflow: hidden `).concat(u,`;
1261   padding-right: `).concat(c,"px ").concat(u,`;
1262  }
1263  body[`).concat(Oh,`] {
1264    overflow: hidden `).concat(u,`;
1265    overscroll-behavior: contain;
1266    `).concat([r&&"position: relative ".concat(u,";"),s==="margin"&&`
1267    padding-left: `.concat(m,`px;
1268    padding-top: `).concat(x,`px;
1269    padding-right: `).concat(v,`px;
1270    margin-left:0;
1271    margin-top:0;
1272    margin-right: `).concat(c,"px ").concat(u,`;
1273    `),s==="padding"&&"padding-right: ".concat(c,"px ").concat(u,";
1273")].filter(Boolean).join(""),`
1274  }
1275  
1276  .`).concat(iv,` {
1277    right: `).concat(c,"px ").concat(u,`;
1278  }
1279  
1280  .`).concat(ov,` {
1281    margin-right: `).concat(c,"px ").concat(u,`;
1282  }
1283  
1284  .`).concat(iv," .").concat(iv,` {
1285    right: 0 `).concat(u,`;
1286  }
1287  
1288  .`).concat(ov," .").concat(ov,` {
1289    margin-right: 0 `).concat(u,`;
1290  }
1291  
1292  body[`).concat(Oh,`] {
1293    `).concat(rG,": ").concat(c,`px;
1294  }
1295`)},ZI=function(){var e=parseInt(document.body.getAttribute(Oh)||"0",10);return isFinite(e)?e:0},bG=function(){R.useEffect(function(){return document.body.setAttribute(Oh,(ZI()+1).toString()),function(){var e=ZI()-1;e<=0?document.body.removeAttribute(Oh):document.body.setAttribute(Oh,e.toString())}},[])},wG=function(e){var r=e.noRelative,s=e.noImportant,u=e.gapMode,m=u===void 0?"margin":u;bG();var x=R.useMemo(function(){return _G(m)},[m]);return R.createElement(vG,{styles:xG(x,!r,m,s?"":"!important")})},n2=!1;if(typeof window<"u")try{var A_=Object.defineProperty({},"passive",{get:function(){return n2=!0,!0}});window.addEventListener("test",A_,A_),window.removeEventListener("test",A_,A_)}catch{n2=!1}var lh=n2?{passive:!1}:!1,SG=function(e){return e.tagName==="TEXTAREA"},VL=function(e,r){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!SG(e)&&s[r]==="visible")},TG=function(e){return VL(e,"overflowY")},EG=function(e){return VL(e,"overflowX")},HI=function(e,r){var s=r.ownerDocument,u=r;do{typeof ShadowRoot<"u"&&u instanceof ShadowRoot&&(u=u.host);var m=UL(e,u);if(m){var x=$L(e,u),v=x[1],c=x[2];if(v>c)return!0}u=u.parentNode}while(u&&u!==s.body);return!1},PG=function(e){var r=e.scrollTop,s=e.scrollHeight,u=e.clientHeight;return[r,s,u]},CG=function(e){var r=e.scrollLeft,s=e.scrollWidth,u=e.clientWidth;return[r,s,u]},UL=function(e,r){return e==="v"?TG(r):EG(r)},$L=function(e,r){return e==="v"?PG(r):CG(r)},IG=function(e,r){return e==="h"&&r==="rtl"?-1:1},MG=function(e,r,s,u,m){var x=IG(e,window.getComputedStyle(r).direction),v=x*u,c=s.target,A=r.contains(c),L=!1,z=v>0,j=0,V=0;do{if(!c)break;var Z=$L(e,c),K=Z[0],Y=Z[1],ie=Z[2],Q=Y-ie-x*K;(K||Q)&&UL(e,c)&&(j+=Q,V+=K);var G=c.parentNode;c=G&&G.nodeType===Node.DOCUMENT_FRAGMENT_NODE?G.host:G}while(!A&&c!==document.body||A&&(r.contains(c)||r===c));return(z&&Math.abs(j)<1||!z&&Math.abs(V)<1)&&(L=!0),L},R_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},XI=function(e){return[e.deltaX,e.deltaY]},KI=function(e){return e&&"current"in e?e.current:e},AG=function(e,r){return e[0]===r[0]&&e[1]===r[1]},RG=function(e){return`
1296  .block-interactivity-`.concat(e,` {pointer-events: none;}
1297  .allow-interactivity-`).concat(e,` {pointer-events: all;}
1298`)},kG=0,ch=[];function DG(e){var r=R.useRef([]),s=R.useRef([0,0]),u=R.useRef(),m=R.useState(kG++)[0],x=R.useState(BL)[0],v=R.useRef(e);R.useEffect(function(){v.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(m));var Y=eG([e.lockRef.current],(e.shards||[]).map(KI),!0).filter(Boolean);return Y.forEach(function(ie){return ie.classList.add("allow-interactivity-".concat(m))}),function(){document.body.classList.remove("block-interactivity-".concat(m)),Y.forEach(function(ie){return ie.classList.remove("allow-interactivity-".concat(m))})}}},[e.inert,e.lockRef.current,e.shards]);var c=R.useCallback(function(Y,ie){if("touches"in Y&&Y.touches.length===2||Y.type==="wheel"&&Y.ctrlKey)return!v.current.allowPinchZoom;var Q=R_(Y),G=s.current,J="deltaX"in Y?Y.deltaX:G[0]-Q[0],ue="deltaY"in Y?Y.deltaY:G[1]-Q[1],ce,xe=Y.target,Re=Math.abs(J)>Math.abs(ue)?"h":"v";if("touches"in Y&&Re==="h"&&xe.type==="range")return!1;var Ce=window.getSelection(),re=Ce&&Ce.anchorNode,se=re?re===xe||re.contains(xe):!1;if(se)return!1;var ve=HI(Re,xe);if(!ve)return!0;if(ve?ce=Re:(ce=Re==="v"?"h":"v",ve=HI(Re,xe)),!ve)return!1;if(!u.current&&"changedTouches"in Y&&(J||ue)&&(u.current=ce),!ce)return!0;var Me=u.current||ce;return MG(Me,ie,Y,Me==="h"?J:ue)},[]),A=R.useCallback(function(Y){var ie=Y;if(!(!ch.length||ch[ch.length-1]!==x)){var Q="deltaY"in ie?XI(ie):R_(ie),G=r.current.filter(function(ce){return ce.name===ie.type&&(ce.target===ie.target||ie.target===ce.shadowParent)&&AG(ce.delta,Q)})[0];if(G&&G.should){ie.cancelable&&ie.preventDefault();return}
vendor: 4,570 bytes, line 1298
1298if(!G){var J=(v.current.shards||[]).map(KI).filter(Boolean).filter(function(ce){return ce.contains(ie.target)}),ue=J.length>0?c(ie,J[0]):!v.current.noIsolation;ue&&ie.cancelable&&ie.preventDefault()}}},[]),L=R.useCallback(function(Y,ie,Q,G){var J={name:Y,delta:ie,target:Q,should:G,shadowParent:LG(Q)};r.current.push(J),setTimeout(function(){r.current=r.current.filter(function(ue){return ue!==J})},1)},[]),z=R.useCallback(function(Y){s.current=R_(Y),u.current=void 0},[]),j=R.useCallback(function(Y){L(Y.type,XI(Y),Y.target,c(Y,e.lockRef.current))},[]),V=R.useCallback(function(Y){L(Y.type,R_(Y),Y.target,c(Y,e.lockRef.current))},[]);R.useEffect(function(){return ch.push(x),e.setCallbacks({onScrollCapture:j,onWheelCapture:j,onTouchMoveCapture:V}),document.addEventListener("wheel",A,lh),document.addEventListener("touchmove",A,lh),document.addEventListener("touchstart",z,lh),function(){ch=ch.filter(function(Y){return Y!==x}),document.removeEventListener("wheel",A,lh),document.removeEventListener("touchmove",A,lh),document.removeEventListener("touchstart",z,lh)}},[]);var Z=e.removeScrollBar,K=e.inert;return R.createElement(R.Fragment,null,K?R.createElement(x,{styles:RG(m)}):null,Z?R.createElement(wG,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function LG(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const zG=cG(NL,DG);var NS=R.forwardRef(function(e,r){return R.createElement(S0,Is({},e,{ref:r,sideCar:zG}))});NS.classNames=S0.classNames;var i2=["Enter"," "],OG=["ArrowDown","PageUp","Home"],GL=["ArrowUp","PageDown","End"],FG=[...OG,...GL],jG={ltr:[...i2,"ArrowRight"],rtl:[...i2,"ArrowLeft"]},NG={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yg="Menu",[Km,BG,VG]=fS(yg),[ju,qL]=zs(yg,[VG,v0,AL]),T0=v0(),WL=AL(),[UG,Nu]=ju(yg),[$G,_g]=ju(yg),ZL=e=>{const{__scopeMenu:r,open:s=!1,children:u,dir:m,onOpenChange:x,modal:v=!0}=e,c=T0(r),[A,L]=R.useState(null),z=R.useRef(!1),j=Kr(x),V=FS(m);return R.useEffect(()=>{const Z=()=>{z.current=!0,document.addEventListener("pointerdown",K,{capture:!0,once:!0}),document.addEventListener("pointermove",K,{capture:!0,once:!0})},K=()=>z.current=!1;return document.addEventListener("keydown",Z,{capture:!0}),()=>{document.removeEventListener("keydown",Z,{capture:!0}),document.removeEventListener("pointerdown",K,{capture:!0}),document.removeEventListener("pointermove",K,{capture:!0})}},[]),R.useEffect(()=>{if(!s)return;const Z=()=>j(!1);return window.addEventListener("blur",Z),()=>window.removeEventListener("blur",Z)},[s,j]),M.jsx(nL,{...c,children:M.jsx(UG,{scope:r,open:s,onOpenChange:j,content:A,onContentChange:L,children:M.jsx($G,{scope:r,onClose:R.useCallback(()=>j(!1),[j]),isUsingKeyboardRef:z,dir:V,modal:v,children:u})})})};ZL.displayName=yg;var GG="MenuAnchor",BS=R.forwardRef((e,r)=>{const{__scopeMenu:s,...u}=e,m=T0(s);return M.jsx(iL,{...m,...u,ref:r})});BS.displayName=GG;var VS="MenuPortal",[qG,HL]=ju(VS,{forceMount:void 0}),XL=e=>{const{__scopeMenu:r,forceMount:s,children:u,container:m}=e,x=Nu(VS,r);return M.jsx(qG,{scope:r,forceMount:s,children:M.jsx(Fi,{present:s||x.open,children:M.jsx(d0,{asChild:!0,container:m,children:u})})})};XL.displayName=VS;var So="MenuContent",[WG,US]=ju(So),KL=R.forwardRef((e,r)=>{const s=HL(So,e.__scopeMenu),{forceMount:u=s.forceMount,...m}=e,x=Nu(So,e.__scopeMenu),v=_g(So,e.__scopeMenu);return M.jsx(Km.Provider,{scope:e.__scopeMenu,children:M.jsx(Fi,{present:u||x.open,children:M.jsx(Km.Slot,{scope:e.__scopeMenu,children:v.modal?M.jsx(ZG,{...m,ref:r}):M.jsx(HG,{...m,ref:r})})})})}),ZG=R.forwardRef((e,r)=>{const s=Nu(So,e.__scopeMenu),u=R.useRef(null),m=fr(r,u);return R.useEffect(()=>{const x=u.current;if(x)return OL(x)},[]),M.jsx($S,{...e,ref:m,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:xt(e.onFocusOutside,x=>x.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),HG=R.forwardRef((e,r)=>{const s=Nu(So,e.__scopeMenu);return M.jsx($S,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),XG=op("MenuContent.ScrollLock"),$S=R.forwardRef((e,r)=>{const{__scopeMenu:s,loop:u=!1,trapFocus:m,onOpenAutoFocus:x,onCloseAutoFocus:v,disableOutsidePointerEvents:c,onEntryFocus:A,onEscapeKeyDown:L,onPointerDownOutside:z,onFocusOutside:j,onInteractOutside:V,onDismiss:Z,disableOutsideScroll:K,...Y}=e,ie=Nu(So,s),Q=_g(So,s),G=T0(s),J=WL(s),ue=BG(s),[ce,xe]=R.useState(null),Re=R.useRef(null),Ce=fr(r,Re,ie.onContentChange),re=R.useRef(0),se=R.useRef(""),ve=R.useRef(0),Me=
vendor: 9,421 bytes, line 1298
1298R.useRef(null),qe=R.useRef("right"),$e=R.useRef(0),De=K?NS:R.Fragment,Ze=K?{as:XG,allowPinchZoom:!0}:void 0,We=Pe=>{var Tt,cr;const Ke=se.current+Pe,ot=ue().filter(zt=>!zt.disabled),ze=document.activeElement,Je=(Tt=ot.find(zt=>zt.ref.current===ze))==null?void 0:Tt.textValue,mt=ot.map(zt=>zt.textValue),ht=a9(mt,Ke,Je),Ct=(cr=ot.find(zt=>zt.textValue===ht))==null?void 0:cr.ref.current;(function zt(xn){se.current=xn,window.clearTimeout(re.current),xn!==""&&(re.current=window.setTimeout(()=>zt(""),1e3))})(Ke),Ct&&setTimeout(()=>Ct.focus())};R.useEffect(()=>()=>window.clearTimeout(re.current),[]),CL();const Ae=R.useCallback(Pe=>{var ot,ze;return qe.current===((ot=Me.current)==null?void 0:ot.side)&&c9(Pe,(ze=Me.current)==null?void 0:ze.area)},[]);return M.jsx(WG,{scope:s,searchRef:se,onItemEnter:R.useCallback(Pe=>{Ae(Pe)&&Pe.preventDefault()},[Ae]),onItemLeave:R.useCallback(Pe=>{var Ke;Ae(Pe)||((Ke=Re.current)==null||Ke.focus(),xe(null))},[Ae]),onTriggerLeave:R.useCallback(Pe=>{Ae(Pe)&&Pe.preventDefault()},[Ae]),pointerGraceTimerRef:ve,onPointerGraceIntentChange:R.useCallback(Pe=>{Me.current=Pe},[]),children:M.jsx(De,{...Ze,children:M.jsx(jS,{asChild:!0,trapped:m,onMountAutoFocus:xt(x,Pe=>{var Ke;Pe.preventDefault(),(Ke=Re.current)==null||Ke.focus({preventScroll:!0})}),onUnmountAutoFocus:v,children:M.jsx(cg,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:L,onPointerDownOutside:z,onFocusOutside:j,onInteractOutside:V,onDismiss:Z,children:M.jsx(X$,{asChild:!0,...J,dir:Q.dir,orientation:"vertical",loop:u,currentTabStopId:ce,onCurrentTabStopIdChange:xe,onEntryFocus:xt(A,Pe=>{Q.isUsingKeyboardRef.current||Pe.preventDefault()}),preventScrollOnEntryFocus:!0,children:M.jsx(oL,{role:"menu","aria-orientation":"vertical","data-state":hz(ie.open),"data-radix-menu-content":"",dir:Q.dir,...G,...Y,ref:Ce,style:{outline:"none",...Y.style},onKeyDown:xt(Y.onKeyDown,Pe=>{const ot=Pe.target.closest("[data-radix-menu-content]")===Pe.currentTarget,ze=Pe.ctrlKey||Pe.altKey||Pe.metaKey,Je=Pe.key.length===1;ot&&(Pe.key==="Tab"&&Pe.preventDefault(),!ze&&Je&&We(Pe.key));const mt=Re.current;if(Pe.target!==mt||!FG.includes(Pe.key))return;Pe.preventDefault();const Ct=ue().filter(Tt=>!Tt.disabled).map(Tt=>Tt.ref.current);GL.includes(Pe.key)&&Ct.reverse(),o9(Ct)}),onBlur:xt(e.onBlur,Pe=>{Pe.currentTarget.contains(Pe.target)||(window.clearTimeout(re.current),se.current="")}),onPointerMove:xt(e.onPointerMove,Ym(Pe=>{const Ke=Pe.target,ot=$e.current!==Pe.clientX;if(Pe.currentTarget.contains(Ke)&&ot){const ze=Pe.clientX>$e.current?"right":"left";qe.current=ze,$e.current=Pe.clientX}}))})})})})})})});KL.displayName=So;var KG="MenuGroup",GS=R.forwardRef((e,r)=>{const{__scopeMenu:s,...u}=e;return M.jsx(kt.div,{role:"group",...u,ref:r})});GS.displayName=KG;var YG="MenuLabel",YL=R.forwardRef((e,r)=>{const{__scopeMenu:s,...u}=e;return M.jsx(kt.div,{...u,ref:r})});YL.displayName=YG;var Vv="MenuItem",YI="menu.itemSelect",E0=R.forwardRef((e,r)=>{const{disabled:s=!1,onSelect:u,...m}=e,x=R.useRef(null),v=_g(Vv,e.__scopeMenu),c=US(Vv,e.__scopeMenu),A=fr(r,x),L=R.useRef(!1),z=()=>{const j=x.current;if(!s&&j){const V=new CustomEvent(YI,{bubbles:!0,cancelable:!0});j.addEventListener(YI,Z=>u==null?void 0:u(Z),{once:!0}),mS(j,V),V.defaultPrevented?L.current=!1:v.onClose()}};return M.jsx(QL,{...m,ref:A,disabled:s,onClick:xt(e.onClick,z),onPointerDown:j=>{var V;(V=e.onPointerDown)==null||V.call(e,j),L.current=!0},onPointerUp:xt(e.onPointerUp,j=>{var V;L.current||(V=j.currentTarget)==null||V.click()}),onKeyDown:xt(e.onKeyDown,j=>{const V=c.searchRef.current!=="";s||V&&j.key===" "||i2.includes(j.key)&&(j.currentTarget.click(),j.preventDefault())})})});E0.displayName=Vv;var QL=R.forwardRef((e,r)=>{const{__scopeMenu:s,disabled:u=!1,textValue:m,...x}=e,v=US(Vv,s),c=WL(s),A=R.useRef(null),L=fr(r,A),[z,j]=R.useState(!1),[V,Z]=R.useState("");return R.useEffect(()=>{const K=A.current;K&&Z((K.textContent??"").trim())},[x.children]),M.jsx(Km.ItemSlot,{scope:s,disabled:u,textValue:m??V,children:M.jsx(K$,{asChild:!0,...c,focusable:!u,children:M.jsx(kt.div,{role:"menuitem","data-highlighted":z?"":void 0,"aria-disabled":u||void 0,"data-disabled":u?"":void 0,...x,ref:L,onPointerMove:xt(e.onPointerMove,Ym(K=>{u?v.onItemLeave(K):(v.onItemEnter(K),K.defaultPrevented||K.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:xt(e.onPointerLeave,Ym(K=>v.onItemLeave(K))),onFocus:xt(e.onFocus,()=>j(!0)),onBlur:xt(e.onBlur,()=>j(!1))})})})}),QG="MenuCheckboxItem",JL=R.forwardRef((e,r)=>{const{checked:s=!1,onCheckedChange:u,...m}=e;return M.jsx(iz,{scope:e.__scopeMenu,checked:s,children:M.jsx(E0,{role:"menuitemcheckbox","aria-checked":Uv(s)?"mixed":s,...m,ref:r,"data-state":WS(s),onSelect:xt(m.onSelect,()=>u==null?void 0:u(Uv(s)?!0:!s),{checkForDefaultPrevented:!1})})})});JL.displayName=QG;var ez="MenuRadioGroup",[JG,e9]=ju(ez,{value:void 0,onValueChange:()=>{}}),tz=R.forwardRef((e,r)=>{const{value:s,onValueChange:u,...m}=e,x=Kr(u);return M.jsx(JG,{scope:e.__scopeMenu,value:s,onValueChange:x,children:M.jsx(GS,{...m,ref:r})})});tz.displayName=ez;var rz="MenuRadioItem",nz=R.forwardRef((e,r)=>{const{value:s,...u}=e,m=e9(rz,e.__scopeMenu),x=s===m.value;return M.jsx(iz,{scope:e.__scopeMenu,checked:x,children:M.jsx(E0,{role:"menuitemradio","aria-checked":x,...u,ref:r,"data-state":WS(x),onSelect:xt(u.onSelect,()=>{var v;return(v=m.onValueChange)==null?void 0:v.call(m,s)},{checkForDefaultPrevented:!1})})})});nz.displayName=rz;var qS="MenuItemIndicator",[iz,t9]=ju(qS,{checked:!1}),oz=R.forwardRef((e,r)=>{const{__scopeMenu:s,forceMount:u,...m}=e,x=t9(qS,s);return M.jsx(Fi,{present:u||Uv(x.checked)||x.checked===!0,children:M.jsx(kt.span,{...m,ref:r,"data-state":WS(x.checked)})})});oz.displayName=qS;var r9="MenuSeparator",sz=R.forwardRef((e,r)=>{const{__scopeMenu:s,...u}=e;return M.jsx(kt.div,{role:"separator","aria-orientation":"horizontal",...u,ref:r})});sz.displayName=r9;var n9="MenuArrow",az=R.forwardRef((e,r)=>{const{__scopeMenu:s,...u}=e,m=T0(s);return M.jsx(sL,{...m,...u,ref:r})});az.displayName=n9;var i9="MenuSub",[$J,lz]=ju(i9),mm="MenuSubTrigger",cz=R.forwardRef((e,r)=>{const s=Nu(mm,e.__scopeMenu),u=_g(mm,e.__scopeMenu),m=lz(mm,e.__scopeMenu),x=US(mm,e.__scopeMenu),v=R.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:A}=x,L={__scopeMenu:e.__scopeMenu},z=R.useCallback(()=>{v.current&&window.clearTimeout(v.current),v.current=null},[]);return R.useEffect(()=>z,[z]),R.useEffect(()=>{const j=c.current;return()=>{window.clearTimeout(j),A(null)}},[c,A]),M.jsx(BS,{asChild:!0,...L,children:M.jsx(QL,{id:m.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?m.contentId:void 0,"data-state":hz(s.open),...e,ref:nc(r,m.onTriggerChange),onClick:j=>{var V;(V=e.onClick)==null||V.call(e,j),!(e.disabled||j.defaultPrevented)&&(j.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:xt(e.onPointerMove,Ym(j=>{x.onItemEnter(j),!j.defaultPrevented&&!e.disabled&&!s.open&&!v.current&&(x.onPointerGraceIntentChange(null),v.current=window.setTimeout(()=>{s.onOpenChange(!0),z()},100))})),onPointerLeave:xt(e.onPointerLeave,Ym(j=>{var Z,K;z();const V=(Z=s.content)==null?void 0:Z.getBoundingClientRect();if(V){const Y=(K=s.content)==null?void 0:K.dataset.side,ie=Y==="right",Q=ie?-5:5,G=V[ie?"left":"right"],J=V[ie?"right":"left"];x.onPointerGraceIntentChange({area:[{x:j.clientX+Q,y:j.clientY},{x:G,y:V.top},{x:J,y:V.top},{x:J,y:V.bottom},{x:G,y:V.bottom}],side:Y}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>x.onPointerGraceIntentChange(null),300)}else{if(x.onTriggerLeave(j),j.defaultPrevented)return;x.onPointerGraceIntentChange(null)}})),onKeyDown:xt(e.onKeyDown,j=>{var Z;const V=x.searchRef.current!=="";e.disabled||V&&j.key===" "||jG[u.dir].includes(j.key)&&(s.onOpenChange(!0),(Z=s.content)==null||Z.focus(),j.preventDefault())})})})});cz.displayName=mm;var uz="MenuSubContent",dz=R.forwardRef((e,r)=>{const s=HL(So,e.__scopeMenu),{forceMount:u=s.forceMount,align:m="start",...x}=e,v=Nu(So,e.__scopeMenu),c=_g(So,e.__scopeMenu),A=lz(uz,e.__scopeMenu),L=R.useRef(null),z=fr(r,L);return M.jsx(Km.Provider,{scope:e.__scopeMenu,children:M.jsx(Fi,{present:u||v.open,children:M.jsx(Km.Slot,{scope:e.__scopeMenu,children:M.jsx($S,{id:A.contentId,"aria-labelledby":A.triggerId,...x,ref:z,align:m,side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:j=>{var V;c.isUsingKeyboardRef.current&&((V=L.current)==null||V.focus()),j.preventDefault()},onCloseAutoFocus:j=>j.preventDefault(),onFocusOutside:xt(e.onFocusOutside,j=>{j.target!==A.trigger&&v.onOpenChange(!1)}),onEscapeKeyDown:xt(e.onEscapeKeyDown,j=>{c.onClose(),j.preventDefault()}),onKeyDown:xt(e.onKeyDown,j=>{var K;const V=j.currentTarget.contains(j.target),Z=NG[c.dir].includes(j.key);V&&Z&&(v.onOpenChange(!1),(K=A.trigger)==null||K.focus(),j.preventDefault())})})})})})});dz.displayName=uz;function hz(e){return e?"open":"closed"}function Uv(e){return e==="indeterminate"}function WS(e){return Uv(e)?"indeterminate":e?"checked":"unchecked"}function o9(e){const r=document.activeElement;for(const s of e)if(s===r||(s.focus(),document.activeElement!==r))return}function s9(e,r){return e.map((s,u)=>e[(r+u)%e.length])}function a9(e,r,s){const m=r.length>1&&Array.from(r).every(L=>L===r[0])?r[0]:r,x=s?e.indexOf(s):-1;let v=s9(e,Math.max(x,0));m.length===1&&(v=v.filter(L=>L!==s));const A=v.find(L=>
vendor: 4,880 bytes, line 1298
1298L.toLowerCase().startsWith(m.toLowerCase()));return A!==s?A:void 0}function l9(e,r){const{x:s,y:u}=e;let m=!1;for(let x=0,v=r.length-1;x<r.length;v=x++){const c=r[x],A=r[v],L=c.x,z=c.y,j=A.x,V=A.y;z>u!=V>u&&s<(j-L)*(u-z)/(V-z)+L&&(m=!m)}return m}function c9(e,r){if(!r)return!1;const s={x:e.clientX,y:e.clientY};return l9(s,r)}function Ym(e){return r=>r.pointerType==="mouse"?e(r):void 0}var u9=ZL,d9=BS,h9=XL,p9=KL,f9=GS,m9=YL,g9=E0,y9=JL,_9=tz,v9=nz,x9=oz,b9=sz,w9=az,S9=cz,T9=dz,P0="DropdownMenu",[E9]=zs(P0,[qL]),bi=qL(),[P9,pz]=E9(P0),fz=e=>{const{__scopeDropdownMenu:r,children:s,dir:u,open:m,defaultOpen:x,onOpenChange:v,modal:c=!0}=e,A=bi(r),L=R.useRef(null),[z,j]=ug({prop:m,defaultProp:x??!1,onChange:v,caller:P0});return M.jsx(P9,{scope:r,triggerId:no(),triggerRef:L,contentId:no(),open:z,onOpenChange:j,onOpenToggle:R.useCallback(()=>j(V=>!V),[j]),modal:c,children:M.jsx(u9,{...A,open:z,onOpenChange:j,dir:u,modal:c,children:s})})};fz.displayName=P0;var mz="DropdownMenuTrigger",gz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,disabled:u=!1,...m}=e,x=pz(mz,s),v=bi(s);return M.jsx(d9,{asChild:!0,...v,children:M.jsx(kt.button,{type:"button",id:x.triggerId,"aria-haspopup":"menu","aria-expanded":x.open,"aria-controls":x.open?x.contentId:void 0,"data-state":x.open?"open":"closed","data-disabled":u?"":void 0,disabled:u,...m,ref:nc(r,x.triggerRef),onPointerDown:xt(e.onPointerDown,c=>{!u&&c.button===0&&c.ctrlKey===!1&&(x.onOpenToggle(),x.open||c.preventDefault())}),onKeyDown:xt(e.onKeyDown,c=>{u||(["Enter"," "].includes(c.key)&&x.onOpenToggle(),c.key==="ArrowDown"&&x.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});gz.displayName=mz;var C9="DropdownMenuPortal",yz=e=>{const{__scopeDropdownMenu:r,...s}=e,u=bi(r);return M.jsx(h9,{...u,...s})};yz.displayName=C9;var _z="DropdownMenuContent",vz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=pz(_z,s),x=bi(s),v=R.useRef(!1);return M.jsx(p9,{id:m.contentId,"aria-labelledby":m.triggerId,...x,...u,ref:r,onCloseAutoFocus:xt(e.onCloseAutoFocus,c=>{var A;v.current||(A=m.triggerRef.current)==null||A.focus(),v.current=!1,c.preventDefault()}),onInteractOutside:xt(e.onInteractOutside,c=>{const A=c.detail.originalEvent,L=A.button===0&&A.ctrlKey===!0,z=A.button===2||L;(!m.modal||z)&&(v.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});vz.displayName=_z;var I9="DropdownMenuGroup",M9=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(f9,{...m,...u,ref:r})});M9.displayName=I9;var A9="DropdownMenuLabel",xz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(m9,{...m,...u,ref:r})});xz.displayName=A9;var R9="DropdownMenuItem",bz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(g9,{...m,...u,ref:r})});bz.displayName=R9;var k9="DropdownMenuCheckboxItem",wz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(y9,{...m,...u,ref:r})});wz.displayName=k9;var D9="DropdownMenuRadioGroup",L9=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(_9,{...m,...u,ref:r})});L9.displayName=D9;var z9="DropdownMenuRadioItem",Sz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(v9,{...m,...u,ref:r})});Sz.displayName=z9;var O9="DropdownMenuItemIndicator",Tz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(x9,{...m,...u,ref:r})});Tz.displayName=O9;var F9="DropdownMenuSeparator",Ez=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(b9,{...m,...u,ref:r})});Ez.displayName=F9;var j9="DropdownMenuArrow",N9=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(w9,{...m,...u,ref:r})});N9.displayName=j9;var B9="DropdownMenuSubTrigger",Pz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(S9,{...m,...u,ref:r})});Pz.displayName=B9;var V9="DropdownMenuSubContent",Cz=R.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...u}=e,m=bi(s);return M.jsx(T9,{...m,...u,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cz.displayName=V9;
1298var U9=fz,$9=gz,G9=yz,Iz=vz,Mz=xz,Az=bz,Rz=wz,kz=Sz,Dz=Tz,Lz=Ez,zz=Pz,Oz=Cz;const q9=U9,W9=$9,Z9=R.forwardRef(({className:e,inset:r,children:s,...u},m)=>M.jsxs(zz,{ref:m,className:it("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",e),...u,children:[s,M.jsx(A8,{className:"ml-auto"})]}));Z9.displayName=zz.displayName;const H9=R.forwardRef(({className:e,...r},s)=>M.jsx(Oz,{ref:s,className:it("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r}));H9.displayName=Oz.displayName;const Fz=R.forwardRef(({className:e,sideOffset:r=4,...s},u)=>M.jsx(G9,{children:M.jsx(Iz,{ref:u,sideOffset:r,className:it("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...s})}));Fz.displayName=Iz.displayName;const X9=R.forwardRef(({className:e,inset:r,...s},u)=>M.jsx(Az,{ref:u,className:it("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",e),...s}));X9.displayName=Az.displayName;const K9=R.forwardRef(({className:e,children:r,checked:s,...u},m)=>M.jsxs(Rz,{ref:m,className:it("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:s,...u,children:[M.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:M.jsx(Dz,{children:M.jsx(yD,{className:"h-4 w-4"})})}),r]}));K9.displayName=Rz.displayName;const Y9=R.forwardRef(({className:e,children:r,...s},u)=>M.jsxs(kz,{ref:u,className:it("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...s,children:[M.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:M.jsx(Dz,{children:M.jsx(D8,{className:"h-2 w-2 fill-current"})})}),r]}));Y9.displayName=kz.displayName;const jz=R.forwardRef(({className:e,inset:r,...s},u)=>M.jsx(Mz,{ref:u,className:it("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",e),...s}));jz.displayName=Mz.displayName;const Nz=R.forwardRef(({className:e,...r},s)=>M.jsx(Lz,{ref:s,className:it("-mx-1 my-1 h-px bg-muted",e),...r}));Nz.displayName=Lz.displayName;function Q9(e,[r,s]){return Math.min(s,Math.max(r,e))}function J9(e,r){return R.useReducer((s,u)=>r[s][u]??s,e)}var ZS="ScrollArea",[Bz]=zs(ZS),[eq,Co]=Bz(ZS),Vz=R.forwardRef((e,r)=>{const{__scopeScrollArea:s,type:u="hover",dir:m,scrollHideDelay:x=600,...v}=e,[c,A]=R.useState(null),[L,z]=R.useState(null),[j,V]=R.useState(null),[Z,K]=R.useState(null),[Y,ie]=R.useState(null),[Q,G]=R.useState(0),[J,ue]=R.useState(0),[ce,xe]=R.useState(!1),[Re,Ce]=R.useState(!1),re=fr(r,ve=>A(ve)),se=FS(m);return M.jsx(eq,{scope:s,type:u,dir:se,scrollHideDelay:x,scrollArea:c,viewport:L,onViewportChange:z,content:j,onContentChange:V,scrollbarX:Z,onScrollbarXChange:K,scrollbarXEnabled:ce,onScrollbarXEnabledChange:xe,scrollbarY:Y,onScrollbarYChange:ie,scrollbarYEnabled:Re,onScrollbarYEnabledChange:Ce,onCornerWidthChange:G,onCornerHeight
vendor: 8,364 bytes, line 1298
1298Change:ue,children:M.jsx(kt.div,{dir:se,...v,ref:re,style:{position:"relative","--radix-scroll-area-corner-width":Q+"px","--radix-scroll-area-corner-height":J+"px",...e.style}})})});Vz.displayName=ZS;var Uz="ScrollAreaViewport",$z=R.forwardRef((e,r)=>{const{__scopeScrollArea:s,children:u,nonce:m,...x}=e,v=Co(Uz,s),c=R.useRef(null),A=fr(r,c,v.onViewportChange);return M.jsxs(M.Fragment,{children:[M.jsx(tq,{nonce:m}),M.jsx(kt.div,{"data-radix-scroll-area-viewport":"",...x,ref:A,style:{overflowX:v.scrollbarXEnabled?"scroll":"hidden",overflowY:v.scrollbarYEnabled?"scroll":"hidden",...e.style},children:M.jsx("div",{ref:v.onContentChange,style:{minWidth:"100%",display:"table"},children:u})})]})});$z.displayName=Uz;var tq=R.memo(({nonce:e})=>M.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:e}),(e,r)=>e.nonce===r.nonce),Fs="ScrollAreaScrollbar",HS=R.forwardRef((e,r)=>{const{forceMount:s,...u}=e,m=Co(Fs,e.__scopeScrollArea),{onScrollbarXEnabledChange:x,onScrollbarYEnabledChange:v}=m,c=e.orientation==="horizontal";return R.useEffect(()=>(c?x(!0):v(!0),()=>{c?x(!1):v(!1)}),[c,x,v]),m.type==="hover"?M.jsx(rq,{...u,ref:r,forceMount:s}):m.type==="scroll"?M.jsx(nq,{...u,ref:r,forceMount:s}):m.type==="auto"?M.jsx(Gz,{...u,ref:r,forceMount:s}):m.type==="always"?M.jsx(XS,{...u,ref:r,"data-state":"visible"}):null});HS.displayName=Fs;var rq=R.forwardRef((e,r)=>{const{forceMount:s,...u}=e,m=Co(Fs,e.__scopeScrollArea),[x,v]=R.useState(!1);return R.useEffect(()=>{const c=m.scrollArea;let A=0;if(c){const L=()=>{window.clearTimeout(A),v(!0)},z=()=>{A=window.setTimeout(()=>v(!1),m.scrollHideDelay)};return c.addEventListener("pointerenter",L),c.addEventListener("pointerleave",z),()=>{window.clearTimeout(A),c.removeEventListener("pointerenter",L),c.removeEventListener("pointerleave",z)}}},[m.scrollArea,m.scrollHideDelay]),M.jsx(Fi,{present:s||x,children:M.jsx(Gz,{"data-state":x?"visible":"hidden",...u,ref:r})})}),nq=R.forwardRef((e,r)=>{const{forceMount:s,...u}=e,m=Co(Fs,e.__scopeScrollArea),x=e.orientation==="horizontal",v=I0(()=>A("SCROLL_END"),100),[c,A]=J9("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return R.useEffect(()=>{if(c==="idle"){const L=window.setTimeout(()=>A("HIDE"),m.scrollHideDelay);return()=>window.clearTimeout(L)}},[c,m.scrollHideDelay,A]),R.useEffect(()=>{const L=m.viewport,z=x?"scrollLeft":"scrollTop";if(L){let j=L[z];const V=()=>{const Z=L[z];j!==Z&&(A("SCROLL"),v()),j=Z};return L.addEventListener("scroll",V),()=>L.removeEventListener("scroll",V)}},[m.viewport,x,A,v]),M.jsx(Fi,{present:s||c!=="hidden",children:M.jsx(XS,{"data-state":c==="hidden"?"hidden":"visible",...u,ref:r,onPointerEnter:xt(e.onPointerEnter,()=>A("POINTER_ENTER")),onPointerLeave:xt(e.onPointerLeave,()=>A("POINTER_LEAVE"))})})}),Gz=R.forwardRef((e,r)=>{const s=Co(Fs,e.__scopeScrollArea),{forceMount:u,...m}=e,[x,v]=R.useState(!1),c=e.orientation==="horizontal",A=I0(()=>{if(s.viewport){const L=s.viewport.offsetWidth<s.viewport.scrollWidth,z=s.viewport.offsetHeight<s.viewport.scrollHeight;v(c?L:z)}},10);return lp(s.viewport,A),lp(s.content,A),M.jsx(Fi,{present:u||x,children:M.jsx(XS,{"data-state":x?"visible":"hidden",...m,ref:r})})}),XS=R.forwardRef((e,r)=>{const{orientation:s="vertical",...u}=e,m=Co(Fs,e.__scopeScrollArea),x=R.useRef(null),v=R.useRef(0),[c,A]=R.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),L=Xz(c.viewport,c.content),z={...u,sizes:c,onSizesChange:A,hasThumb:L>0&&L<1,onThumbChange:V=>x.current=V,onThumbPointerUp:()=>v.current=0,onThumbPointerDown:V=>v.current=V};function j(V,Z){return cq(V,v.current,c,Z)}return s==="horizontal"?M.jsx(iq,{...z,ref:r,onThumbPositionChange:()=>{if(m.viewport&&x.current){const V=m.viewport.scrollLeft,Z=QI(V,c,m.dir);x.current.style.transform=`translate3d(${Z}px, 0, 0)`}},onWheelScroll:V=>{m.viewport&&(m.viewport.scrollLeft=V)},onDragScroll:V=>{m.viewport&&(m.viewport.scrollLeft=j(V,m.dir))}}):s==="vertical"?M.jsx(oq,{...z,ref:r,onThumbPositionChange:()=>{if(m.viewport&&x.current){const V=m.viewport.scrollTop,Z=QI(V,c);x.current.style.transform=`translate3d(0, ${Z}px, 0)`}},onWheelScroll:V=>{m.viewport&&(m.viewport.scrollTop=V)},onDragScroll:V=>{m.viewport&&(m.viewport.scrollTop=j(V))}}):null}),iq=R.forwardRef((e,r)=>{const{sizes:s,onSizesChange:u,...m}=e,x=Co(Fs,e.__scopeScrollArea),[v,c]=R.useState(),A=R.useRef(null),L=fr(r,A,x.onScrollbarXChange);return R.useEffect(()=>{A.current&&c(getComputedStyle(A.current))},[A]),M.jsx(Wz,{"data-orientation":"horizontal",...m,ref:L,sizes:s,style:{bottom:0,left:x.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:x.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":C0(s)+"px",...e.style},onThumbPointerDown:z=>e.onThumbPointerDown(z.x),onDragScroll:z=>e.onDragScroll(z.x),onWheelScroll:(z,j)=>{if(x.viewport){const V=x.viewport.scrollLeft+z.deltaX;e.onWheelScroll(V),Yz(V,j)&&z.preventDefault()}},onResize:()=>{A.current&&x.viewport&&v&&u({content:x.viewport.scrollWidth,viewport:x.viewport.offsetWidth,scrollbar:{size:A.current.clientWidth,paddingStart:Gv(v.paddingLeft),paddingEnd:Gv(v.paddingRight)}})}})}),oq=R.forwardRef((e,r)=>{const{sizes:s,onSizesChange:u,...m}=e,x=Co(Fs,e.__scopeScrollArea),[v,c]=R.useState(),A=R.useRef(null),L=fr(r,A,x.onScrollbarYChange);return R.useEffect(()=>{A.current&&c(getComputedStyle(A.current))},[A]),M.jsx(Wz,{"data-orientation":"vertical",...m,ref:L,sizes:s,style:{top:0,right:x.dir==="ltr"?0:void 0,left:x.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":C0(s)+"px",...e.style},onThumbPointerDown:z=>e.onThumbPointerDown(z.y),onDragScroll:z=>e.onDragScroll(z.y),onWheelScroll:(z,j)=>{if(x.viewport){const V=x.viewport.scrollTop+z.deltaY;e.onWheelScroll(V),Yz(V,j)&&z.preventDefault()}},onResize:()=>{A.current&&x.viewport&&v&&u({content:x.viewport.scrollHeight,viewport:x.viewport.offsetHeight,scrollbar:{size:A.current.clientHeight,paddingStart:Gv(v.paddingTop),paddingEnd:Gv(v.paddingBottom)}})}})}),[sq,qz]=Bz(Fs),Wz=R.forwardRef((e,r)=>{const{__scopeScrollArea:s,sizes:u,hasThumb:m,onThumbChange:x,onThumbPointerUp:v,onThumbPointerDown:c,onThumbPositionChange:A,onDragScroll:L,onWheelScroll:z,onResize:j,...V}=e,Z=Co(Fs,s),[K,Y]=R.useState(null),ie=fr(r,re=>Y(re)),Q=R.useRef(null),G=R.useRef(""),J=Z.viewport,ue=u.content-u.viewport,ce=Kr(z),xe=Kr(A),Re=I0(j,10);function Ce(re){if(Q.current){const se=re.clientX-Q.current.left,ve=re.clientY-Q.current.top;L({x:se,y:ve})}}return R.useEffect(()=>{const re=se=>{const ve=se.target;(K==null?void 0:K.contains(ve))&&ce(se,ue)};return document.addEventListener("wheel",re,{passive:!1}),()=>document.removeEventListener("wheel",re,{passive:!1})},[J,K,ue,ce]),R.useEffect(xe,[u,xe]),lp(K,Re),lp(Z.content,Re),M.jsx(sq,{scope:s,scrollbar:K,hasThumb:m,onThumbChange:Kr(x),onThumbPointerUp:Kr(v),onThumbPositionChange:xe,onThumbPointerDown:Kr(c),children:M.jsx(kt.div,{...V,ref:ie,style:{position:"absolute",...V.style},onPointerDown:xt(e.onPointerDown,re=>{re.button===0&&(re.target.setPointerCapture(re.pointerId),Q.current=K.getBoundingClientRect(),G.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",Z.viewport&&(Z.viewport.style.scrollBehavior="auto"),Ce(re))}),onPointerMove:xt(e.onPointerMove,Ce),onPointerUp:xt(e.onPointerUp,re=>{const se=re.target;se.hasPointerCapture(re.pointerId)&&se.releasePointerCapture(re.pointerId),document.body.style.webkitUserSelect=G.current,Z.viewport&&(Z.viewport.style.scrollBehavior=""),Q.current=null})})})}),$v="ScrollAreaThumb",Zz=R.forwardRef((e,r)=>{const{forceMount:s,...u}=e,m=qz($v,e.__scopeScrollArea);return M.jsx(Fi,{present:s||m.hasThumb,children:M.jsx(aq,{ref:r,...u})})}),aq=R.forwardRef((e,r)=>{const{__scopeScrollArea:s,style:u,...m}=e,x=Co($v,s),v=qz($v,s),{onThumbPositionChange:c}=v,A=fr(r,j=>v.onThumbChange(j)),L=R.useRef(void 0),z=I0(()=>{L.current&&(L.current(),L.current=void 0)},100);return R.useEffect(()=>{const j=x.viewport;if(j){const V=()=>
1298{if(z(),!L.current){const Z=uq(j,c);L.current=Z,c()}};return c(),j.addEventListener("scroll",V),()=>j.removeEventListener("scroll",V)}},[x.viewport,z,c]),M.jsx(kt.div,{"data-state":v.hasThumb?"visible":"hidden",...m,ref:A,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...u},onPointerDownCapture:xt(e.onPointerDownCapture,j=>{const Z=j.target.getBoundingClientRect(),K=j.clientX-Z.left,Y=j.clientY-Z.top;v.onThumbPointerDown({x:K,y:Y})}),onPointerUp:xt(e.onPointerUp,v.onThumbPointerUp)})});Zz.displayName=$v;var KS="ScrollAreaCorner",Hz=R.forwardRef((e,r)=>{const s=Co(KS,e.__scopeScrollArea),u=!!(s.scrollbarX&&s.scrollbarY);return s.type!=="scroll"&&u?M.jsx(lq,{...e,ref:r}):null});Hz.displayName=KS;var lq=R.forwardRef((e,r)=>{const{__scopeScrollArea:s,...u}=e,m=Co(KS,s),[x,v]=R.useState(0),[c,A]=R.useState(0),L=!!(x&&c);return lp(m.scrollbarX,()=>{var j;const z=((j=m.scrollbarX)==null?void 0:j.offsetHeight)||0;m.onCornerHeightChange(z),A(z)}),lp(m.scrollbarY,()=>{var j;const z=((j=m.scrollbarY)==null?void 0:j.offsetWidth)||0;m.onCornerWidthChange(z),v(z)}),L?M.jsx(kt.div,{...u,ref:r,style:{width:x,height:c,position:"absolute",right:m.dir==="ltr"?0:void 0,left:m.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Gv(e){return e?parseInt(e,10):0}function Xz(e,r){const s=e/r;return isNaN(s)?0:s}function C0(e){const r=Xz(e.viewport,e.content),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,u=(e.scrollbar.size-s)*r;return Math.max(u,18)}function cq(e,r,s,u="ltr"){const m=C0(s),x=m/2,v=r||x,c=m-v,A=s.scrollbar.paddingStart+v,L=s.scrollbar.size-s.scrollbar.paddingEnd-c,z=s.content-s.viewport,j=u==="ltr"?[0,z]:[z*-1,0];return Kz([A,L],j)(e)}function QI(e,r,s="ltr"){const u=C0(r),m=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,x=r.scrollbar.size-m,v=r.content-r.viewport,c=x-u,A=s==="ltr"?[0,v]:[v*-1,0],L=Q9(e,A);return Kz([0,v],[0,c])(L)}function Kz(e,r){return s=>{if(e[0]===e[1]||r[0]===r[1])return r[0];const u=(r[1]-r[0])/(e[1]-e[0]);return r[0]+u*(s-e[0])}}function Yz(e,r){return e>0&&e<r}var uq=(e,r=()=>{})=>{let s={left:e.scrollLeft,top:e.scrollTop},u=0;return function m(){const x={left:e.scrollLeft,top:e.scrollTop},v=s.left!==x.left,c=s.top!==x.top;(v||c)&&r(),s=x,u=window.requestAnimationFrame(m)}(),()=>window.cancelAnimationFrame(u)};function I0(e,r){const s=Kr(e),u=R.useRef(0);return R.useEffect(()=>()=>window.clearTimeout(u.current),[]),R.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(s,r)},[s,r])}function lp(e,r){const s=Kr(r);to(()=>{let u=0;if(e){const m=new ResizeObserver(()=>{cancelAnimationFrame(u),u=window.requestAnimationFrame(s)});return m.observe(e),()=>{window.cancelAnimationFrame(u),m.unobserve(e)}}},[e,s])}var Qz=Vz,dq=$z,hq=Hz;const YS=R.forwardRef(({className:e,children:r,...s},u)=>M.jsxs(Qz,{ref:u,className:it("relative overflow-hidden",e),...s,children:[M.jsx(dq,{className:"h-full w-full rounded-[inherit]",children:r}),M.jsx(Jz,{}),M.jsx(hq,{})]}));YS.displayName=Qz.displayName;const Jz=R.forwardRef(({className:e,orientation:r="vertical",...s},u)=>M.jsx(HS,{ref:u,orientation:r,className:it("flex touch-none select-none transition-colors",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...s,children:M.jsx(Zz,{className:"relative flex-1 rounded-full bg-border"})}));Jz.displayName=HS.displayName;var QS="Avatar",[pq]=zs(QS),fq=[0,()=>{}],[mq,e3]=pq(QS),JS=R.forwardRef((e,r)=>{const{__scopeAvatar:s,...u}=e,[m,x]=R.useState("idle"),[v,c]=yq();return M.jsx(mq,{scope:s,imageLoadingStatus:m,setImageLoadingStatus:x,imageCount:v,setImageCount:c,children:M.jsx(kt.span,{...u,ref:r})})});JS.displayName=QS;var t3="AvatarImage",eT=R.forwardRef((e,r)=>{const{__scopeAvatar:s,src:u,onLoadingStatusChange:m,...x}=e,v=e3(t3,s);_q(v.setImageCount);const c=gq(u,{referrerPolicy:x.referrerPolicy,crossOrigin:x.crossOrigin,loadingStatus:v.imageLoadingStatus,setLoadingStatus:v.setImageLoadingStatus}),A=Kr(z=>{m==null||m(z)}),L=R.useRef(c);return to(()=>{const z=L.current;L.current=c,c!==z&&A(c)},[c,A]),c==="loaded"?M.jsx(kt.img,{...x,ref:r,src:u}):null});eT.displayName=t3;var r3="AvatarFallback",tT=R.forwardRef((e,r)=>{const{__scopeAvatar:s,delayMs:u,...m}
1298=e,x=e3(r3,s),[v,c]=R.useState(u===void 0);return R.useEffect(()=>{if(u!==void 0){const A=window.setTimeout(()=>c(!0),u);return()=>window.clearTimeout(A)}},[u]),v&&x.imageLoadingStatus!=="loaded"?M.jsx(kt.span,{...m,ref:r}):null});tT.displayName=r3;function gq(e,{loadingStatus:r,setLoadingStatus:s,referrerPolicy:u,crossOrigin:m}){return to(()=>{if(!e){s("error");return}const x=new window.Image,v=A=>{const L=A.currentTarget;s(JI(L))},c=()=>s("error");return x.addEventListener("load",v),x.addEventListener("error",c),u&&(x.referrerPolicy=u),x.crossOrigin=m??null,x.src=e,s(JI(x)),()=>{x.removeEventListener("load",v),x.removeEventListener("error",c),s("idle")}},[e,m,u,s]),r}function JI(e){return e.complete?e.naturalWidth>0?"loaded":"error":"loading"}function yq(){let e=fq;{e=R.useState(0);const[r]=e,s=R.useRef(!1);R.useEffect(()=>{r>1&&!s.current&&(s.current=!0,console.warn("Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."))},[r])}return e}function _q(e){R.useEffect(()=>(e(r=>r+1),()=>{e(r=>r-1)}),[e])}const n3=R.forwardRef(({className:e,...r},s)=>M.jsx(JS,{ref:s,className:it("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...r}));n3.displayName=JS.displayName;const i3=R.forwardRef(({className:e,...r},s)=>M.jsx(eT,{ref:s,className:it("aspect-square h-full w-full",e),...r}));i3.displayName=eT.displayName;const o3=R.forwardRef(({className:e,...r},s)=>M.jsx(tT,{ref:s,className:it("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...r}));o3.displayName=tT.displayName;const vq=hg("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function s3({className:e,variant:r,...s}){return M.jsx("div",{className:it(vq({variant:r}),e),...s})}function qn(e){const r=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&r==="[object Date]"?new e.constructor(+e):typeof e=="number"||r==="[object Number]"||typeof e=="string"||r==="[object String]"?new Date(e):new Date(NaN)}function xq(e,r){return e instanceof Date?new e.constructor(r):new Date(r)}const GJ=6048e5,qJ=864e5,WJ=6e4,ZJ=36e5,k_=43200,eM=1440;let bq={};function wq(){return bq}function tM(e){const r=qn(e),s=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return s.setUTCFullYear(r.getFullYear()),+e-+s}function sv(e,r){const s=qn(e),u=qn(r),m=s.getTime()-u.getTime();return m<0?-1:m>0?1:m}function Sq(e){return xq(e,Date.now())}function Tq(e,r){const s=qn(e),u=qn(r),m=s.getFullYear()-u.getFullYear(),x=s.getMonth()-u.getMonth();return m*12+x}function Eq(e){return r=>{const u=(e?Math[e]:Math.trunc)(r);return u===0?0:u}}function Pq(e,r){return+qn(e)-+qn(r)}function Cq(e){const r=qn(e);return r.setHours(23,59,59,999),r}function Iq(e){const r=qn(e),s=r.getMonth();return r.setFullYear(r.getFullYear(),s+1,0),r.setHours(23,59,59,999),r}function Mq(e){const r=qn(e);return+Cq(r)==+Iq(r)}function Aq(e,r){const s=qn(e),u=qn(r),m=sv(s,u),x=Math.abs(Tq(s,u));let v;if(x<1)v=0;else{s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-m*x);let c=sv(s,u)===-m;Mq(qn(e))&&x===1&&sv(e,u)===1&&(c=!1),v=m*(x-Number(c))}return v===0?0:v}function Rq(e,r,s){const u=Pq(e,r)/1e3;return Eq(s==null?void 0:s.roundingMethod)(u)}const kq={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"}},Dq=(e,r,s)=>{let u;const m=kq[e];return typeof m=="string"?u=m:r===1?u=m.one:u=m.other.replace("{{count}}
1298",r.toString()),s!=null&&s.addSuffix?s.comparison&&s.comparison>0?"in "+u:u+" ago":u};function x1(e){return(r={})=>{const s=r.width?String(r.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const Lq={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},zq={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Oq={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fq={date:x1({formats:Lq,defaultWidth:"full"}),time:x1({formats:zq,defaultWidth:"full"}),dateTime:x1({formats:Oq,defaultWidth:"full"})},jq={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Nq=(e,r,s,u)=>jq[e];function om(e){return(r,s)=>{const u=s!=null&&s.context?String(s.context):"standalone";let m;if(u==="formatting"&&e.formattingValues){const v=e.defaultFormattingWidth||e.defaultWidth,c=s!=null&&s.width?String(s.width):v;m=e.formattingValues[c]||e.formattingValues[v]}else{const v=e.defaultWidth,c=s!=null&&s.width?String(s.width):e.defaultWidth;m=e.values[c]||e.values[v]}const x=e.argumentCallback?e.argumentCallback(r):r;return m[x]}}const Bq={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vq={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uq={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"]},$q={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"]},Gq={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"}},qq={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"}},Wq=(e,r)=>{const s=Number(e),u=s%100;if(u>20||u<10)switch(u%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},Zq={ordinalNumber:Wq,era:om({values:Bq,defaultWidth:"wide"}),quarter:om({values:Vq,defaultWidth:"wide",argumentCallback:e=>e-1}),month:om({values:Uq,defaultWidth:"wide"}),day:om({values:$q,defaultWidth:"wide"}),dayPeriod:om({values:Gq,defaultWidth:"wide",formattingValues:qq,defaultFormattingWidth:"wide"})};function sm(e){return(r,s={})=>{const u=s.width,m=u&&e.matchPatterns[u]||e.matchPatterns[e.defaultMatchWidth],x=r.match(m);if(!x)return null;const v=x[0],c=u&&e.parsePatterns[u]||e.parsePatterns[e.defaultParseWidth],A=Array.isArray(c)?Xq(c,j=>j.test(v)):Hq(c,j=>j.test(v));let L;L=e.valueCallback?e.valueCallback(A):A,L=s.valueCallback?s.valueCallback(L):L;const z=r.slice(v.length);return{value:L,rest:z}}}function Hq(e,r){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&r(e[s]))return s}function Xq(e,r){for(let s=0;s<e.length;s++)if(r(e[s]))return s}function Kq(e){return(r,s={})=>{const u=r.match(e.matchPattern);if(!u)return null;const m=u[0],x=r.match(e.parsePattern);if(!x)return null;let v=e.valueCallback?e.valueCallback(x[0]):x[0];v=s.valueCallback?s.valueCallback(v):v;const c=r.slice(m.length);return{value:v,rest:c}}}const Yq=/^(\d+)(th|st|nd|rd)?/i,Qq=/\d+/i,Jq={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},eW={any:[/^b/i,/^(a|c)/i]},tW={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rW={any:[/1/i,/2/i,/3/i,/4/i]},nW={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},iW={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]},oW={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},sW={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]},aW={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},lW={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}},cW={ordinalNumber:Kq({matchPattern:Yq,parsePattern:Qq,valueCallback:e=>parseInt(e,10)}),era:sm({matchPatterns:Jq,defaultMatchWidth:"wide",parsePatterns:eW,defaultParseWidth:"any"}),quarter:sm({matchPatterns:tW,defaultMatchWidth:"wide",parsePatterns:rW,defaultParseWidth:"any",valueCallback:e=>e+1}),month:sm({matchPatterns:nW,defaultMatchWidth:"wide",parsePatterns:iW,defaultParseWidth:"any"}),day:sm({matchPatterns:oW,defaultMatchWidth:"wide",parsePatterns:sW,defaultParseWidth:"any"}),dayPeriod:sm({matchPatterns:aW,defaultMatchWidth:"any",parsePatterns:lW,defaultParseWidth:"any"})},uW={code:"en-US",formatDistance:Dq,formatLong:Fq,formatRelative:Nq,localize:Zq,match:cW,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dW(e,r,s){const u=wq(),m=(s==null?void 0:s.locale)??u.locale??uW,x=2520,v=sv(e,r);if(isNaN(v))throw new RangeError("Invalid time value");const c=Object.assign({},s,{addSuffix:s==null?void 0:s.addSuffix,comparison:v});let A,L;v>0?(A=qn(r),L=qn(e)):(A=qn(e),L=qn(r));const z=Rq(L,A),j=(tM(L)-tM(A))/1e3,V=Math.round((z-j)/60);let Z;if(V<2)return s!=null&&s.includeSeconds?z<5?m.formatDistance("lessThanXSeconds",5,c):z<10?m.formatDistance("lessThanXSeconds",10,c):z<20?m.formatDistance("lessThanXSeconds",20,c):z<40?m.formatDistance("halfAMinute",0,c):z<60?m.formatDistance("lessThanXMinutes",1,c):m.formatDistance("xMinutes",1,c):V===0?m.formatDistance("lessThanXMinutes",1,c):m.formatDistance("xMinutes",V,c);if(V<45)return m.formatDistance("xMinutes",V,c);if(V<90)return m.formatDistance("aboutXHours",1,c);if(V<eM){const K=Math.round(V/60);return m.formatDistance("aboutXHours",K,c)}else{if(V<x)return m.formatDistance("xDays",1,c);if(V<k_){const K=Math.round(V/eM);return m.formatDistance("xDays",K,c)}else if(V<k_*2)return Z=Math.round(V/k_),m.formatDistance("aboutXMonths",Z,c)}if(Z=Aq(L,A),Z<12){const K=Math.round(V/k_);return m.formatDistance("xMonths",K,c)}else{const K=Z%12,Y=Math.trunc(Z/12);return K<3?m.formatDistance("aboutXYears",Y,c):K<9?m.formatDistance("overXYears",Y,c):m.formatDistance("almostXYears",Y+1,c)}}
1298function hW(e,r){return dW(e,Sq(e),r)}const pW={follow:ED,like:_D,comment:bD,slant:Z8};function fW(){const e=pS(),[r,s]=R.useState(!1),{isAuthenticated:u}=Na(),{data:m}=ip({queryKey:["/api/notifications/count"],refetchInterval:u?3e4:!1,enabled:u}),{data:x,isLoading:v}=ip({queryKey:["/api/notifications"],enabled:r&&u}),c=H_({mutationFn:async V=>Rh("PATCH",`/api/notifications/${V}/read`),onSuccess:()=>{e.invalidateQueries({queryKey:["/api/notifications"]}),e.invalidateQueries({queryKey:["/api/notifications/count"]})}}),A=H_({mutationFn:async()=>Rh("PATCH","/api/notifications/read-all"),onSuccess:()=>{e.invalidateQueries({queryKey:["/api/notifications"]}),e.invalidateQueries({queryKey:["/api/notifications/count"]})}}),L=H_({mutationFn:async V=>Rh("DELETE",`/api/notifications/${V}`),onSuccess:()=>{e.invalidateQueries({queryKey:["/api/notifications"]}),e.invalidateQueries({queryKey:["/api/notifications/count"]})}}),z=(m==null?void 0:m.unread)||0,j=V=>{var Y,ie;if(!V)return"?";const Z=((Y=V.firstName)==null?void 0:Y[0])||"",K=((ie=V.lastName)==null?void 0:ie[0])||"";return(Z+K).toUpperCase()||"?"};return M.jsxs(q9,{open:r,onOpenChange:s,children:[M.jsx(W9,{asChild:!0,children:M.jsxs(sn,{variant:"ghost",size:"icon",className:"relative","data-testid":"notifications-trigger",children:[M.jsx(Q_,{className:"h-5 w-5"}),z>0&&M.jsx(s3,{variant:"destructive",className:"absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center p-0 text-xs","data-testid":"notifications-badge",children:z>99?"99+":z})]})}),M.jsxs(Fz,{align:"end",className:"w-80","data-testid":"notifications-dropdown",children:[M.jsxs(jz,{className:"flex items-center justify-between",children:[M.jsx("span",{children:"Notifications"}),z>0&&M.jsxs(sn,{variant:"ghost",size:"sm",className:"h-auto p-0 text-xs text-muted-foreground hover:text-primary",onClick:()=>A.mutate(),"data-testid":"mark-all-read",children:[M.jsx(M8,{className:"h-3 w-3 mr-1"}),"Mark all read"]})]}),M.jsx(Nz,{}),M.jsx(YS,{className:"h-[300px]",children:v?M.jsx("div",{className:"p-4 text-center text-muted-foreground",children:"Loading notifications..."}):x&&x.length>0?M.jsx("div",{className:"space-y-1",children:x.map(V=>{var K;const Z=pW[V.type]||Q_;return M.jsxs("div",{className:`flex items-start gap-3 p-3 hover:bg-muted/50 cursor-pointer transition-colors ${V.read?"":"bg-primary/5"}`,onClick:()=>{V.read||c.mutate(V.id)},"data-testid":`notification-item-${V.id}`,children:[M.jsxs(n3,{className:"h-8 w-8 flex-shrink-0",children:[M.jsx(i3,{src:((K=V.actor)==null?void 0:K.profileImageUrl)||void 0}),M.jsx(o3,{className:"text-xs",children:j(V.actor)})]}),M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(Z,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),M.jsx("p",{className:"text-sm font-medium truncate",children:V.title}),!V.read&&M.jsx("div",{className:"w-2 h-2 bg-primary rounded-full flex-shrink-0"})]}),V.message&&M.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:V.message}),M.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:hW(new Date(V.createdAt),{addSuffix:!0})})]}),M.jsx(sn,{variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0 opacity-0 group-hover:opacity-100 hover:opacity-100",onClick:Y=>{Y.stopPropagation(),L.mutate(V.id)},"data-testid":`delete-notification-${V.id}`,children:M.jsx(K8,{className:"h-3 w-3"})})]},V.id)})}):M.jsxs("div",{className:"p-4 text-center text-muted-foreground","data-testid":"notifications-empty",children:[M.jsx(Q_,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),M.jsx("p",{className:"text-sm",children:"No notifications yet"}),M.jsx("p",{className:"text-xs mt-1",children:"You'll see updates when people follow you or engage with your content"})]})})]})]})}var rM=1,mW=.9,gW=.8,yW=.17,b1=.1,w1=.999,_W=.9999,vW=.99,xW=/[\\\/_+.#"@\[\(\{&]/,bW=/[\\\/_+.#"@\[\(\{&]/g,wW=/[\s-]/,a3=/[\s-]/g;function o2(e,r,s,u,m,x,v){if(x===r.length)return m===e.length?rM:vW;var c=`${m},${x}`;if(v[c]!==void 0)return v[c];for(var A=u.charAt(x),L=s.indexOf(A,m),z=0,j,V,Z,K;L>=0;)j=o2(e,r,s,u,L+1,x+1,v),j>z&&(L===m?j*=rM:xW.test(e.charAt(L-1))?(j*=gW,Z=e.slice(m,L-1).match(bW),Z&&m>
vendor: 15,424 bytes, line 1298
12980&&(j*=Math.pow(w1,Z.length))):wW.test(e.charAt(L-1))?(j*=mW,K=e.slice(m,L-1).match(a3),K&&m>0&&(j*=Math.pow(w1,K.length))):(j*=yW,m>0&&(j*=Math.pow(w1,L-m))),e.charAt(L)!==r.charAt(x)&&(j*=_W)),(j<b1&&s.charAt(L-1)===u.charAt(x+1)||u.charAt(x+1)===u.charAt(x)&&s.charAt(L-1)!==u.charAt(x))&&(V=o2(e,r,s,u,L+1,x+2,v),V*b1>j&&(j=V*b1)),j>z&&(z=j),L=s.indexOf(A,L+1);return v[c]=z,z}function nM(e){return e.toLowerCase().replace(a3," ")}function SW(e,r,s){return e=s&&s.length>0?`${e+" "+s.join(" ")}`:e,o2(e,r,nM(e),nM(r),0,0,{})}var M0="Dialog",[l3,HJ]=zs(M0),[TW,ts]=l3(M0),A0=e=>{const{__scopeDialog:r,children:s,open:u,defaultOpen:m,onOpenChange:x,modal:v=!0}=e,c=R.useRef(null),A=R.useRef(null),[L,z]=ug({prop:u,defaultProp:m??!1,onChange:x,caller:M0});return M.jsx(TW,{scope:r,triggerRef:c,contentRef:A,contentId:no(),titleId:no(),descriptionId:no(),open:L,onOpenChange:z,onOpenToggle:R.useCallback(()=>z(j=>!j),[z]),modal:v,children:s})};A0.displayName=M0;var c3="DialogTrigger",rT=R.forwardRef((e,r)=>{const{__scopeDialog:s,...u}=e,m=ts(c3,s),x=fr(r,m.triggerRef);return M.jsx(kt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":m.open,"aria-controls":m.open?m.contentId:void 0,"data-state":iT(m.open),...u,ref:x,onClick:xt(e.onClick,m.onOpenToggle)})});rT.displayName=c3;var nT="DialogPortal",[EW,u3]=l3(nT,{forceMount:void 0}),R0=e=>{const{__scopeDialog:r,forceMount:s,children:u,container:m}=e,x=ts(nT,r);return M.jsx(EW,{scope:r,forceMount:s,children:R.Children.map(u,v=>M.jsx(Fi,{present:s||x.open,children:M.jsx(d0,{asChild:!0,container:m,children:v})}))})};R0.displayName=nT;var qv="DialogOverlay",vp=R.forwardRef((e,r)=>{const s=u3(qv,e.__scopeDialog),{forceMount:u=s.forceMount,...m}=e,x=ts(qv,e.__scopeDialog);return x.modal?M.jsx(Fi,{present:u||x.open,children:M.jsx(CW,{...m,ref:r})}):null});vp.displayName=qv;var PW=op("DialogOverlay.RemoveScroll"),CW=R.forwardRef((e,r)=>{const{__scopeDialog:s,...u}=e,m=ts(qv,s),x=jB(),v=fr(r,x);return M.jsx(NS,{as:PW,allowPinchZoom:!0,shards:[m.contentRef],children:M.jsx(kt.div,{"data-state":iT(m.open),...u,ref:v,style:{pointerEvents:"auto",...u.style}})})}),cp="DialogContent",xp=R.forwardRef((e,r)=>{const s=u3(cp,e.__scopeDialog),{forceMount:u=s.forceMount,...m}=e,x=ts(cp,e.__scopeDialog);return M.jsx(Fi,{present:u||x.open,children:x.modal?M.jsx(IW,{...m,ref:r}):M.jsx(MW,{...m,ref:r})})});xp.displayName=cp;var IW=R.forwardRef((e,r)=>{const s=ts(cp,e.__scopeDialog),u=R.useRef(null),m=fr(r,s.contentRef,u);return R.useEffect(()=>{const x=u.current;if(x)return OL(x)},[]),M.jsx(d3,{...e,ref:m,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:xt(e.onCloseAutoFocus,x=>{var v;x.preventDefault(),(v=s.triggerRef.current)==null||v.focus()}),onPointerDownOutside:xt(e.onPointerDownOutside,x=>{const v=x.detail.originalEvent,c=v.button===0&&v.ctrlKey===!0;(v.button===2||c)&&x.preventDefault()}),onFocusOutside:xt(e.onFocusOutside,x=>x.preventDefault())})}),MW=R.forwardRef((e,r)=>{const s=ts(cp,e.__scopeDialog),u=R.useRef(!1),m=R.useRef(!1);return M.jsx(d3,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:x=>{var v,c;(v=e.onCloseAutoFocus)==null||v.call(e,x),x.defaultPrevented||(u.current||(c=s.triggerRef.current)==null||c.focus(),x.preventDefault()),u.current=!1,m.current=!1},onInteractOutside:x=>{var A,L;(A=e.onInteractOutside)==null||A.call(e,x),x.defaultPrevented||(u.current=!0,x.detail.originalEvent.type==="pointerdown"&&(m.current=!0));const v=x.target;((L=s.triggerRef.current)==null?void 0:L.contains(v))&&x.preventDefault(),x.detail.originalEvent.type==="focusin"&&m.current&&x.preventDefault()}})}),d3=R.forwardRef((e,r)=>{const{__scopeDialog:s,trapFocus:u,onOpenAutoFocus:m,onCloseAutoFocus:x,...v}=e,c=ts(cp,s);return CL(),M.jsx(M.Fragment,{children:M.jsx(jS,{asChild:!0,loop:!0,trapped:u,onMountAutoFocus:m,onUnmountAutoFocus:x,children:M.jsx(cg,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":iT(c.open),...v,ref:r,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),h3="DialogTitle",vg=R.forwardRef((e,r)=>{const{__scopeDialog:s,...u}=e,m=ts(h3,s);return M.jsx(kt.h2,{id:m.titleId,...u,ref:r})});vg.displayName=h3;var p3="DialogDescription",xg=R.forwardRef((e,r)=>{const{__scopeDialog:s,...u}=e,m=ts(p3,s);return M.jsx(kt.p,{id:m.descriptionId,...u,ref:r})});xg.displayName=p3;var f3="DialogClose",k0=R.forwardRef((e,r)=>{const{__scopeDialog:s,...u}=e,m=ts(f3,s);return M.jsx(kt.button,{type:"button",...u,ref:r,onClick:xt(e.onClick,()=>m.onOpenChange(!1))})});k0.displayName=f3;function iT(e){return e?"open":"closed"}var am='[cmdk-group=""]',S1='[cmdk-group-items=""]',AW='[cmdk-group-heading=""]',m3='[cmdk-item=""]',iM=`${m3}:not([aria-disabled="true"])`,s2="cmdk-item-select",uh="data-value",RW=(e,r,s)=>SW(e,r,s),g3=R.createContext(void 0),bg=()=>R.useContext(g3),y3=R.createContext(void 0),oT=()=>R.useContext(y3),_3=R.createContext(void 0),v3=R.forwardRef((e,r)=>{let s=dh(()=>{var ze,Je;return{search:"",value:(Je=(ze=e.value)!=null?ze:e.defaultValue)!=null?Je:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=dh(()=>new Set),m=dh(()=>new Map),x=dh(()=>new Map),v=dh(()=>new Set),c=x3(e),{label:A,children:L,value:z,onValueChange:j,filter:V,shouldFilter:Z,loop:K,disablePointerSelection:Y=!1,vimBindings:ie=!0,...Q}=e,G=no(),J=no(),ue=no(),ce=R.useRef(null),xe=UW();ku(()=>{if(z!==void 0){let ze=z.trim();s.current.value=ze,Re.emit()}},[z]),ku(()=>{xe(6,qe)},[]);let Re=R.useMemo(()=>({subscribe:ze=>(v.current.add(ze),()=>v.current.delete(ze)),snapshot:()=>s.current,setState:(ze,Je,mt)=>{var ht,Ct,Tt,cr;if(!Object.is(s.current[ze],Je)){if(s.current[ze]=Je,ze==="search")Me(),se(),xe(1,ve);else if(ze==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let zt=document.getElementById(ue);zt?zt.focus():(ht=document.getElementById(G))==null||ht.focus()}if(xe(7,()=>{var zt;s.current.selectedItemId=(zt=$e())==null?void 0:zt.id,Re.emit()}),mt||xe(5,qe),((Ct=c.current)==null?void 0:Ct.value)!==void 0){let zt=Je??"";(cr=(Tt=c.current).onValueChange)==null||cr.call(Tt,zt);return}}Re.emit()}},emit:()=>{v.current.forEach(ze=>ze())}}),[]),Ce=R.useMemo(()=>({value:(ze,Je,mt)=>{var ht;Je!==((ht=x.current.get(ze))==null?void 0:ht.value)&&(x.current.set(ze,{value:Je,keywords:mt}),s.current.filtered.items.set(ze,re(Je,mt)),xe(2,()=>{se(),Re.emit()}))},item:(ze,Je)=>(u.current.add(ze),Je&&(m.current.has(Je)?m.current.get(Je).add(ze):m.current.set(Je,new Set([ze]))),xe(3,()=>{Me(),se(),s.current.value||ve(),Re.emit()}),()=>{x.current.delete(ze),u.current.delete(ze),s.current.filtered.items.delete(ze);let mt=$e();xe(4,()=>{Me(),(mt==null?void 0:mt.getAttribute("id"))===ze&&ve(),Re.emit()})}),group:ze=>(m.current.has(ze)||m.current.set(ze,new Set),()=>{x.current.delete(ze),m.current.delete(ze)}),filter:()=>c.current.shouldFilter,label:A||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:G,inputId:ue,labelId:J,listInnerRef:ce}),[]);function re(ze,Je){var mt,ht;let Ct=(ht=(mt=c.current)==null?void 0:mt.filter)!=null?ht:RW;return ze?Ct(ze,s.current.search,Je):0}function se(){if(!s.current.search||c.current.shouldFilter===!1)return;let ze=s.current.filtered.items,Je=[];s.current.filtered.groups.forEach(ht=>{let Ct=m.current.get(ht),Tt=0;Ct.forEach(cr=>{let zt=ze.get(cr);Tt=Math.max(zt,Tt)}),Je.push([ht,Tt])});let mt=ce.current;De().sort((ht,Ct)=>{var Tt,cr;let zt=ht.getAttribute("id"),xn=Ct.getAttribute("id");return((Tt=ze.get(xn))!=null?Tt:0)-((cr=ze.get(zt))!=null?cr:0)}).forEach(ht=>{let Ct=ht.closest(S1);Ct?Ct.appendChild(ht.parentElement===Ct?ht:ht.closest(`${S1} > *`)):mt.appendChild(ht.parentElement===mt?ht:ht.closest(`${S1} > *`))}),Je.sort((ht,Ct)=>Ct[1]-ht[1]).forEach(ht=>{var Ct;let Tt=(Ct=ce.current)==null?void 0:Ct.querySelector(`${am}[${uh}="${encodeURIComponent(ht[0])}"]`);Tt==null||Tt.parentElement.appendChild(Tt)})}function ve(){let ze=De().find(mt=>mt.getAttribute("aria-disabled")!=="true"),Je=ze==null?void 0:ze.getAttribute(uh);Re.setState("value",Je||void 0)}function Me(){var ze,Je,mt,ht;if(!s.current.search||c.current.shouldFilter===!1){s.current.filtered.count=u.current.size;return}s.current.filtered.groups=new Set;let Ct=0;for(let Tt of u.current){let cr=(Je=(ze=x.current.get(Tt))==null?void 0:ze.value)!=null?Je:"",zt=(ht=(mt=x.current.get(Tt))==null?void 0:mt.keywords)!=null?ht:[],xn=re(cr,zt);s.current.filtered.items.set(Tt,xn),xn>0&&Ct++}for(let[Tt,cr]of m.current)for(let zt of cr)if(s.current.filtered.items.get(zt)>0){s.current.filtered.groups.add(Tt);break}s.current.filtered.count=Ct}function qe(){var ze,Je,mt;let ht=$e();ht&&(((ze=ht.parentElement)==null?void 0:ze.firstChild)===ht&&((mt=(Je=ht.closest(am))==null?void 0:Je.querySelector(AW))==null||mt.scrollIntoView({block:"nearest"})),ht.scrollIntoView({block:"nearest"}))}function $e(){var ze;return(ze=ce.current)==null?void 0:ze.querySelector(`${m3}[aria-selected="true"]`)}function De(){var ze;return Array.from(((ze=ce.current)==null?void 0:ze.querySelectorAll(iM))||[])}function Ze(ze){let Je=De()[ze];Je&&Re.setState("value",Je.getAttribute(uh))}function We(ze){var Je;let mt=$e(),ht=De(),Ct=ht.findIndex(cr=>cr===mt),Tt=ht[Ct+ze];(Je=c.current)!=null&&Je.loop&&(Tt=Ct+ze<0?ht[ht.length-1]:Ct+ze===ht.length?ht[0]:ht[Ct+ze]),Tt&&Re.setState("value",Tt.getAttribute(uh))}function Ae(ze){let Je=$e(),mt=Je==null?void 0:Je.closest(am),ht;for(;mt&&!ht;)mt=ze>0?BW(mt,am):VW(mt,am),ht=mt==null?void 0:mt.querySelector(iM);ht?Re.setState("value",ht.getAttribute(uh)):We(ze)}let Pe=()=>Ze(De().length-1),Ke=ze=>{ze.preventDefault(),ze.metaKey?Pe():ze.altKey?Ae(1):We(1)},ot=ze=>{ze.preventDefault(),ze.metaKey?Ze(0):ze.altKey?Ae(-1):We(-1)};return R.createElement(kt.div,{ref:r,tabIndex:-1,...Q,"cmdk-root":"",onKeyDown:ze=>{var Je;(Je=Q.onKeyDown)==null||Je.call(Q,ze);let mt=ze.nativeEvent.isComposing||ze.keyCode===229;if(!(ze.defaultPrevented||mt))switch(ze.key){case"n":case"j":{ie&&ze.ctrlKey&&Ke(ze);break}case"ArrowDown":{Ke(ze);break}case"p":case"k":{ie&&ze.ctrlKey&&ot(ze);break}case"ArrowUp":{ot(ze);break}case"Home":{ze.preventDefault(),Ze(0);break}case"End":{ze.preventDefault(),Pe();break}case"Enter":{ze.preventDefault();let ht=$e();if(ht){let Ct=new Event(s2);ht.dispatchEvent(Ct)}}}}},R.createElement("label",{"cmdk-label":"",htmlFor:Ce.inputId,id:Ce.labelId,style:GW},A),D0(e,ze=>R.createElement(y3.Provider,{value:Re},R.createElement(g3.Provider,{value:Ce},ze))))}),kW=R.forwardRef((e,r)=>{var s,u;let m=no(),x=R.useRef(null),v=R.useContext(_3),c=bg(),A=x3(e),L=(u=(s=A.current)==null?void 0:s.forceMount)!=null?u:v==null?void 0:v.forceMount;ku(()=>{if(!L)return c.item(m,v==null?void 0:v.id)},[L]);let z=b3(m,x,[e.value,e.children,x],e.keywords),j=oT(),V=lc(xe=>xe.value&&xe.value===z.current),Z=lc(xe=>L||c.filter()===!1?!0:xe.search?xe.filtered.items.get(m)>0:!0);R.useEffect(()=>{let xe=x.current;if(!(!xe||e.disabled))return xe.addEventListener(s2,K),()=>xe.removeEventListener(s2,K)},[Z,e.onSelect,e.disabled]);function K(){var xe,Re;Y(),(Re=(xe=A.current).onSelect)==null||Re.call(xe,z.current)}function Y(){j.setState("value",z.current,!0)}if(!Z)return null;let{disabled:ie,value:Q,onSelect:G,forceMount:J,keywords:ue,...ce}=e;return R.createElement(kt.div,{ref:nc(x,r),...ce,id:m,"cmdk-item":"",role:"option","aria-disabled":!!ie,"aria-selected":!!V,"data-disabled":!!ie,"data-selected":!!V,onPointerMove:ie||c.getDisablePointerSelection()?void 0:Y,onClick:ie?void 0:K},e.children)}),DW=R.forwardRef((e,r)=>{let{heading:s,children:u,forceMount:m,...x}=e,v=no(),c=R.useRef(null),A=R.useRef(null),L=no(),z=bg(),j=lc(Z=>m||z.filter()===!1?!0:Z.search?Z.filtered.groups.has(v):!0);ku(()=>z.group(v),[]),b3(v,c,[e.value,e.heading,A]);let V=R.useMemo(()=>({id:v,forceMount:m}),[m]);return R.createElement(kt.div,{ref:nc(c,r),...x,"cmdk-group":"",role:"presentation",hidden:j?void 0:!0},s&&R.createElement("div",{ref:A,"cmdk-group-heading":"","aria-hidden":!0,id:L},s),D0(e,Z=>R.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?L:void 0},R.createElement(_3.Provider,{value:V},Z))))}),LW=R.forwardRef((e,r)=>{let{alwaysRender:s,...u}=e,m=R.useRef(null),x=lc(v=>!v.search);return!s&&!x?null:R.createElement(kt.div,{ref:nc(m,r),...u,"cmdk-separator":"",role:"separator"})}),zW=R.forwardRef((e,r)=>{let{onValueChange:s,...u}=e,m=e.value!=null,x=oT(),v=lc(L=>L.search),c=lc(L=>L.selectedItemId),A=bg();return R.useEffect(()=>{e.value!=null&&x.setState("search",e.value)},[e.value]),R.createElement(kt.input,{ref:r,...u,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":A.listId,"aria-labelledby":A.labelId,"aria-activedescendant":c,id:A.inputId,type:"text",value:m?e.value:v,onChange:L=>{m||x.setState("search",L.target.value),s==null||s(L.target.value)}})}),OW=R.forwardRef((e,r)=>{let{children:s,label:u="Suggestions",...m}=e,x=R.useRef(null),v=R.useRef(null),c=lc(L=>L.selectedItemId),A=bg();return R.useEffect(()=>{if(v.current&&x.current){let L=v.current,z=x.current,j,V=new ResizeObserver(()=>{j=requestAnimationFrame(()=>{let Z=L.offsetHeight;z.style.setProperty("--cmdk-list-height",Z.toFixed(1)+"px")})});return V.observe(L),()=>{cancelAnimationFrame(j),V.unobserve(L)}}},[]),R.createElement(kt.div,{ref:nc(x,r),...m,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":u,id:A.listId},D0(e,L=>R.createElement("div",{ref:nc(v,A.listInnerRef),"cmdk-list-sizer":""},L)))}),FW=R.forwardRef((e,r)=>{let{open:s,onOpenChange:u,overlayClassName:m,contentClassName:x,container:v,...c}=e;return R.createElement(A0,{open:s,onOpenChange:u},R.createElement(R0,{container:v},R.createElement(vp,{"cmdk-overlay":"",className:m}),R.createElement(xp,{"aria-label":e.label,"cmdk-dialog":"",className:x},R.createElement(v3,{ref:r,...c}))))}),jW=R.forwardRef((e,r)=>lc(s=>s.filtered.count===0)?R.createElement(kt.div,{ref:r,...e,"cmdk-empty":"",role:"presentation"}):null),NW=R.forwardRef((e,r)=>{let{progress:s,children:u,label:m="Loading...",...x}=e;return R.createElement(kt.div,{ref:r,...x,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":m},D0(e,v=>R.createElement("div",{"aria-hidden":!0},v)))}),Ni=Object.assign(v3,{List:OW,Item:kW,Input:zW,Group:DW,Separator:LW,Dialog:FW,Empty:jW,Loading:NW});function BW(e,r){let s=e.nextElementSibling;for(;s;){if(s.matches(r))return s;s=s.nextElementSibling}}function VW(e,r){let s=e.previousElementSibling;for(;s;){if(s.matches(r))return s;s=s.previousElementSibling}}function x3(e){let r=R.useRef(e);return ku(()=>{r.current=e}),r}var ku=typeof window>"u"?R.useEffect:R.useLayoutEffect;function dh(e){let r=R.useRef();return r.current===void 0&&(r.current=e()),r}function lc(e){let r=oT(),s=()=>e(r.snapshot());return R.useSyncExternalStore(r.subscribe,s,s)}function b3(e,r,s,u=[]){let m=R.useRef(),x=bg();return ku(()=>{var v;let c=(()=>{var L;for(let z of s){if(typeof z=="string")return z.trim();if(typeof z=="object"&&"current"in z)return z.current?(L=z.current.textContent)==null?void 0:L.trim():m.current}})(),A=u.map(L=>L.trim());x.value(e,c,A),(v=r.current)==null||v.setAttribute(uh,c),m.current=c}),m}var UW=()=>{let[e,r]=R.useState(),s=dh(()=>new Map);return ku(()=>{s.current.forEach(u=>
1298u()),s.current=new Map},[e]),(u,m)=>{s.current.set(u,m),r({})}};function $W(e){let r=e.type;return typeof r=="function"?r(e.props):"render"in r?r.render(e.props):e}function D0({asChild:e,children:r},s){return e&&R.isValidElement(r)?R.cloneElement($W(r),{ref:r.ref},s(r.props.children)):s(r)}var GW={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const qW=A0,XJ=rT,WW=R0,KJ=k0,w3=R.forwardRef(({className:e,...r},s)=>M.jsx(vp,{ref:s,className:it("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r}));w3.displayName=vp.displayName;const S3=R.forwardRef(({className:e,children:r,...s},u)=>M.jsxs(WW,{children:[M.jsx(w3,{}),M.jsxs(xp,{ref:u,className:it("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...s,children:[r,M.jsxs(k0,{className:"absolute right-4 top-4 roun
1298ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[M.jsx(pg,{className:"h-4 w-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));S3.displayName=xp.displayName;const ZW=({className:e,...r})=>M.jsx("div",{className:it("flex flex-col space-y-1.5 text-center sm:text-left",e),...r});ZW.displayName="DialogHeader";const HW=({className:e,...r})=>M.jsx("div",{className:it("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});HW.displayName="DialogFooter";const XW=R.forwardRef(({className:e,...r},s)=>M.jsx(vg,{ref:s,className:it("text-lg font-semibold leading-none tracking-tight",e),...r}));XW.displayName=vg.displayName;const KW=R.forwardRef(({className:e,...r},s)=>M.jsx(xg,{ref:s,className:it("text-sm text-muted-foreground",e),...r}));KW.displayName=xg.displayName;const T3=R.forwardRef(({className:e,...r},s)=>M.jsx(Ni,{ref:s,className:it("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...r}));T3.displayName=Ni.displayName;const YW=({children:e,...r})=>M.jsx(qW,{...r,children:M.jsx(S3,{className:"overflow-hidden p-0 shadow-lg",children:M.jsx(T3,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),E3=R.forwardRef(({className:e,...r},s)=>M.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[M.jsx(SD,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),M.jsx(Ni.Input,{ref:s,className:it("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...r})]}));E3.displayName=Ni.Input.displayName;const P3=R.forwardRef(({className:e,...r},s)=>M.jsx(Ni.List,{ref:s,className:it("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...r}));P3.displayName=Ni.List.displayName;const C3=R.forwardRef((e,r)=>M.jsx(Ni.Empty,{ref:r,className:"py-6 text-center text-sm",...e}));C3.displayName=Ni.Empty.displayName;const ya=R.forwardRef(({className:e,...r},s)=>M.jsx(Ni.Group,{ref:s,className:it("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...r}));ya.displayName=Ni.Group.displayName;const lu=R.forwardRef(({className:e,...r},s)=>M.jsx(Ni.Separator,{ref:s,className:it("-mx-1 h-px bg-border",e),...r}));lu.displayName=Ni.Separator.displayName;const _a=R.forwardRef(({className:e,...r},s)=>M.jsx(Ni.Item,{ref:s,className:it("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...r}));_a.displayName=Ni.Item.displayName;function I3({onTranscript:e,onError:r,disabled:s=!1,size:u="default",className:m}){const[x,v]=R.useState(!1),[c,A]=R.useState(!0),L=R.useRef(null);R.useEffect(()=>{const Z=window.SpeechRecognition||window.webkitSpeechRecognition;if(!Z){A(!1);return}const K=new Z;return K.continuous=!1,K.interimResults=!1,K.lang="en-US",K.maxAlternatives=1,K.onresult=Y=>{const ie=Y.results[0][0].transcript;e(ie),v(!1)},K.onerror=Y=>{console.error("[VoiceButton] Speech recognition error:",Y.error),Y.error==="not-allowed"?r==null||r("Microphone access denied. Please allow microphone permissions."):Y.error==="no-speech"?r==null||r("No speech detected. Try again."):r==null||r(`Speech recognition error: ${Y.error}`),v(!1)},K.onend=()=>{v(!1)},L.current=K,()=>{K.abort()}},[e,r]);const z=R.useCallback(()=>
1298{if(!L.current){r==null||r("Speech recognition is not supported in this browser.");return}if(x)L.current.stop(),v(!1);else try{L.current.start(),v(!0)}catch(Z){console.error("[VoiceButton] Failed to start recognition:",Z),r==null||r("Failed to start voice recognition. Please try again.")}},[x,r]);if(!c)return M.jsx(sn,{variant:"outline",size:u,disabled:!0,className:it("opacity-50",m),"data-testid":"voice-button-unsupported",children:M.jsx(V8,{className:"h-4 w-4"})});const j={sm:"h-8 w-8",default:"h-10 w-10",lg:"h-14 w-14"},V={sm:"h-4 w-4",default:"h-5 w-5",lg:"h-6 w-6"};return M.jsx(sn,{variant:x?"default":"outline",size:"icon",onClick:z,disabled:s,className:it(j[u],"rounded-full transition-all duration-200",x&&"bg-red-500 hover:bg-red-600 animate-pulse border-red-500",m),"data-testid":"voice-button","aria-label":x?"Stop listening":"Start voice command",children:x?M.jsx(Ww,{className:it(V[u],"text-white")}):M.jsx(Ww,{className:V[u]})})}const lm=[{name:"Home",href:"/",icon:ic,description:"Dashboard and overview",category:"main"},{name:"Discover",href:"/discover",icon:fm,description:"Explore travel videos",category:"main"},{name:"My Slants",href:"/routes",icon:q8,description:"Your saved itineraries",category:"main"},{name:"Destinations",href:"/destinations",icon:Zm,description:"Browse destinations",category:"main"},{name:"Community",href:"/community",icon:Yo,description:"Connect with travelers",category:"main"},{name:"My Events",href:"/my-events",icon:J_,description:"Your registered events",category:"main"},{name:"Group Trips",href:"/group-trips",icon:Yo,description:"Plan trips with friends",category:"main"},{name:"Create Slant",href:"/routes/new",icon:Fu,description:"Plan a new itinerary",category:"create"},{name:"Video Analysis",href:"/video-analysis",icon:C8,description:"Extract locations from videos",category:"create"},{name:"Notes",href:"/notes",icon:qw,description:"Your travel notes",category:"create"},{name:"Checklists",href:"/checklists",icon:qw,description:"Packing and to-do lists",category:"create"},{name:"Creator Studio",href:"/creator-studio",icon:Q8,description:"Create and manage content",category:"content"},{name:"Template Library",href:"/templates",icon:E8,description:"Route templates",category:"content"},{name:"Booking Hub",href:"/bookings",icon:ec,description:"Manage bookings",category:"content"},{name:"Creator Analytics",href:"/creator-analytics",icon:ln,description:"Performance insights",category:"analytics"},{name:"Chain Explorer",href:"/chains",icon:wo,description:"Spider chain analytics",category:"analytics"},{name:"Presale Dashboard",href:"/presale-dashboard",icon:xS,description:"Manage presale offers",category:"analytics"},{name:"Reports",href:"/reports",icon:ln,description:"Live KPIs & analytics",category:"analytics"},{name:"View Active Campaigns",href:"/campaign-reports",icon:ro,description:"Campaign performance reports",category:"analytics"},{name:"Create Campaign",href:"/campaigns/create",icon:ro,description:"Launch marketing campaigns",category:"create"},{name:"Location Zones",href:"/geofences",icon:vn,description:"Manage location boundaries",category:"analytics"},{name:"Create Location Zone",href:"/geofences/create",icon:vn,description:"Set up new zone",category:"create"},{name:"Wallet",href:"/wallet",icon:tV,description:"Currency and budget",category:"settings"},{name:"AI Recommendations",href:"/recommendations",icon:bD,description:"Personalized suggestions",category:"settings"},{name:"My Favourites",href:"/routes",icon:_D,description:"Saved content",category:"settings"},{name:"Profile Settings",href:"/settings/profile",icon:W8,description:"Account settings",category:"settings"},{name:"Demo",href:"/demo/marqus-blakely",icon:f0,description:"Platform demo",category:"settings"},{name:"QR Onboarding",href:"/qr-onboarding",icon:_i,description:"Generate QR codes",category:"settings"},{name:"Wristband Orders",href:"/admin/wristbands",icon:nV,description:"Manage wristband fulfilment & token status",category:"settings"},{name:"Wristband Job Aid",href:"/admin/wristband-job-aid",icon:Wm,description:"QR generation procedure & ops guide",category:"settings"},{name:"Event Readiness Console",href:"/admin/event-readiness",icon:Wm,description:"Validate QR, geofence, SMS, chat & wristband for each NFL city",category:"settings"}],M3="slant_command_history",QW=5;function av(){try{const e=localStorage.getItem(M3);return e?JSON.parse(e):[]}catch{return[]}}function oM(e){try{const r=av().filter(u=>u.text!==e.text),s=[e,...r].slice(0,QW);localStorage.setItem(M3,JSON.stringify(s))}catch{}}function JW({open:e,onOpenChange:r,onCommandExecuted:s}){const[,u]=hc(),{user:m}=Na(),[x,v]=R.useState(""),[c,A]=R.useState(!1),[L,z]=R.useState(null),[j,V]=R.use
1298State([]);R.useEffect(()=>{e&&(V(av()),z(null),v(""))},[e]),R.useEffect(()=>{const ce=xe=>{xe.key==="k"&&(xe.metaKey||xe.ctrlKey)&&(xe.preventDefault(),r(!0)),xe.key==="Escape"&&e&&(xe.preventDefault(),r(!1))};return window.addEventListener("keydown",ce),()=>window.removeEventListener("keydown",ce)},[e,r]);const Z=R.useCallback(ce=>{r(!1),u(ce)},[u,r]),K=.7,Y=.8,ie=R.useCallback((ce,xe)=>{const Re=!xe.targetUrl;xe.intent!=="unclear"&&xe.intent!=="forbidden"&&xe.intent!=="error"&&xe.permitted&&(oM({text:ce,displayLabel:xe.displayLabel,targetUrl:xe.targetUrl,at:Date.now()}),Re?xe.confidence>=K&&s&&s(ce,xe):xe.targetUrl&&xe.confidence>=Y&&(r(!1),u(xe.targetUrl)))},[u,r,s]),Q=R.useCallback(async ce=>{const xe=ce.trim();if(xe){A(!0),z(null);try{const re=(await(await Rh("POST","/api/ai-command/classify",{text:xe})).json()).data;z(re),V(av()),ie(xe,re)}catch(Re){console.error("[GlobalSearch] AI command error:",Re),z({intent:"error",confidence:0,parameters:{},targetUrl:null,displayLabel:"Something went wrong. Try again.",clarifyQuestion:null,permitted:!1})}finally{A(!1)}}},[ie]),G=R.useCallback(()=>{L&&(L.targetUrl&&L.permitted?(oM({text:x.trim(),displayLabel:L.displayLabel,targetUrl:L.targetUrl,at:Date.now()}),V(av()),r(!1),u(L.targetUrl)):!L.targetUrl&&L.permitted&&L.intent!=="unclear"&&s&&s(x.trim(),L))},[L,x,u,r,s]),J={main:lm.filter(ce=>ce.category==="main"),create:lm.filter(ce=>ce.category==="create"),content:lm.filter(ce=>ce.category==="content"),analytics:lm.filter(ce=>ce.category==="analytics"),settings:lm.filter(ce=>ce.category==="settings")},ue=x.trim().length>0;return M.jsxs(YW,{open:e,onOpenChange:r,children:[M.jsx(E3,{placeholder:"Search or ask anything… (e.g. 'show my earnings')",className:"text-foreground placeholder:text-muted-foreground",value:x,onValueChange:v,"data-testid":"global-search-input"}),M.jsxs("div",{className:"flex items-center justify-end px-3 py-1 border-b gap-2",children:[M.jsx("span",{className:"text-xs text-muted-foreground",children:"or speak"}),M.jsx(I3,{size:"sm",onTranscript:ce=>{v(ce),Q(ce)},onError:ce=>console.warn("[GlobalSearch] Voice error:",ce),"data-testid":"voice-button-search"})]}),M.jsxs(P3,{children:[(c||L)&&M.jsxs("div",{className:"px-3 py-3 border-b","data-testid":"ai-command-result",children:[c&&M.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[M.jsx(xD,{className:"h-4 w-4 animate-spin"}),M.jsx("span",{children:"Thinking…"})]}),!c&&L&&M.jsx("div",{className:"space-y-2",children:M.jsxs("div",{className:"flex items-start gap-2",children:[L.intent==="unclear"||L.intent==="error"?M.jsx(k8,{className:"h-4 w-4 text-amber-500 mt-0.5 shrink-0"}):M.jsx(pI,{className:"h-4 w-4 text-primary mt-0.5 shrink-0"}),M.jsxs("div",{className:"flex-1 min-w-0",children:[M.jsx("p",{className:"text-sm font-medium leading-snug","data-testid":"ai-command-label",children:L.displayLabel}),L.clarifyQuestion&&M.jsx("p",{className:"text-xs text-muted-foreground mt-1","data-testid":"ai-command-clarify",children:L.clarifyQuestion}),L.confidence>0&&L.intent!=="unclear"&&M.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[M.jsxs(s3,{variant:"secondary",className:"text-xs h-5","data-testid":"ai-command-confidence",children:[Math.round(L.confidence*100),"% confident"]}),L.permitted&&(L.targetUrl?M.jsxs("button",{onClick:G,className:"inline-flex items-center gap-1 text-xs text-primary hover:underline","data-testid":"ai-command-execute",children:["Go ",M.jsx(w8,{className:"h-3 w-3"})]}):M.jsx("button",{onClick:G,className:"inline-flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400 hover:underline","data-testid":"ai-command-execute",children:"Run action ✓"}))]}),L.permitted&&!L.targetUrl&&L.intent!=="unclear"&&Object.keys(L.parameters).length>0&&M.jsx("p",{className:"text-xs text-muted-foreground mt-1","data-testid":"ai-command-params",children:Object.entries(L.parameters).map(([ce,xe])=>`${ce}: ${String(xe)}`).join(" · ")})]})]})})]}),ue&&!c&&!L&&M.jsx(ya,{heading:"AI Command",children:M.jsxs(_a,{value:`__ai__${x}`,onSelect:()=>Q(x),"data-testid":"ai-command-trigger",children:[M.jsx(pI,{className:"mr-2 h-4 w-4 text-primary"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{children:"Run as AI command"}),M.jsxs("span",{className:"text-xs text-muted-foreground",children:['Ask Slant to act on: "',x.slice(0,60),x.length>60?"…":"",'"']})]})]})}),!ue&&j.length>
12980&&M.jsxs(M.Fragment,{children:[M.jsx(ya,{heading:"Recent Commands",children:j.map((ce,xe)=>M.jsxs(_a,{value:`__history__${ce.text}`,onSelect:()=>{ce.targetUrl?(r(!1),u(ce.targetUrl)):(v(ce.text),Q(ce.text))},"data-testid":`history-item-${xe}`,children:[M.jsx(L8,{className:"mr-2 h-4 w-4 text-muted-foreground"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{className:"text-sm",children:ce.text}),M.jsx("span",{className:"text-xs text-muted-foreground",children:ce.displayLabel})]})]},`${ce.at}-${xe}`))}),M.jsx(lu,{})]}),M.jsx(C3,{children:c?M.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"Thinking…"}):M.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:"No results found."})}),M.jsx(ya,{heading:"Navigation",children:J.main.map(ce=>{const xe=ce.icon;return M.jsxs(_a,{value:ce.name,onSelect:()=>Z(ce.href),"data-testid":`search-item-${ce.name.toLowerCase().replace(/\s+/g,"-")}`,children:[M.jsx(xe,{className:"mr-2 h-4 w-4"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{children:ce.name}),ce.description&&M.jsx("span",{className:"text-xs text-muted-foreground",children:ce.description})]})]},ce.href+ce.name)})}),M.jsx(lu,{}),M.jsx(ya,{heading:"Create",children:J.create.map(ce=>{const xe=ce.icon;return M.jsxs(_a,{value:ce.name,onSelect:()=>Z(ce.href),"data-testid":`search-item-${ce.name.toLowerCase().replace(/\s+/g,"-")}`,children:[M.jsx(xe,{className:"mr-2 h-4 w-4"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{children:ce.name}),ce.description&&M.jsx("span",{className:"text-xs text-muted-foreground",children:ce.description})]})]},ce.href+ce.name)})}),M.jsx(lu,{}),M.jsx(ya,{heading:"Content",children:J.content.map(ce=>{const xe=ce.icon;return M.jsxs(_a,{value:ce.name,onSelect:()=>Z(ce.href),"data-testid":`search-item-${ce.name.toLowerCase().replace(/\s+/g,"-")}`,children:[M.jsx(xe,{className:"mr-2 h-4 w-4"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{children:ce.name}),ce.description&&M.jsx("span",{className:"text-xs text-muted-foreground",children:ce.description})]})]},ce.href+ce.name)})}),M.jsx(lu,{}),M.jsx(ya,{heading:"Analytics",children:J.analytics.map(ce=>{const xe=ce.icon;return M.jsxs(_a,{value:ce.name,onSelect:()=>Z(ce.href),"data-testid":`search-item-${ce.name.toLowerCase().replace(/\s+/g,"-")}`,children:[M.jsx(xe,{className:"mr-2 h-4 w-4"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{children:ce.name}),ce.description&&M.jsx("span",{className:"text-xs text-muted-foreground",children:ce.description})]})]},ce.href+ce.name)})}),M.jsx(lu,{}),M.jsx(ya,{heading:"Settings & Tools",children:J.settings.map(ce=>{const xe=ce.icon;return M.jsxs(_a,{value:ce.name,onSelect:()=>Z(ce.href),"data-testid":`search-item-${ce.name.toLowerCase().replace(/\s+/g,"-")}`,children:[M.jsx(xe,{className:"mr-2 h-4 w-4"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{children:ce.name}),ce.description&&M.jsx("span",{className:"text-xs text-muted-foreground",children:ce.description})]})]},ce.href+ce.name)})}),m&&M.jsxs(M.Fragment,{children:[M.jsx(lu,{}),M.jsx(ya,{heading:"Profile",children:M.jsxs(_a,{value:"My Profile",onSelect:()=>Z(`/profile/${m.id}`),"data-testid":"search-item-my-profile",children:[M.jsx(PD,{className:"mr-2 h-4 w-4"}),M.jsxs("div",{className:"flex flex-col",children:[M.jsx("span",{children:"My Profile"}),M.jsx("span",{className:"text-xs text-muted-foreground",children:"View your profile"})]})]})})]})]})]})}const A3=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,className:it("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r}));A3.displayName="Card";const eZ=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,className:it("flex flex-col space-y-1.5 p-6",e),...r}));eZ.displayName="CardHeader";const tZ=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,className:it("text-2xl font-semibold leading-none tracking-tight",e),...r}));tZ.displayName="CardTitle";const rZ=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,className:it("text-sm text-muted-foreground",e),...r}));
1298rZ.displayName="CardDescription";const nZ=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,className:it("p-6 pt-0",e),...r}));nZ.displayName="CardContent";const iZ=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,className:it("flex items-center p-6 pt-0",e),...r}));iZ.displayName="CardFooter";function oZ({isOpen:e,onClose:r,location:s,chainId:u,journeyId:m}){const[x,v]=R.useState([]),[c,A]=R.useState(!1),L=R.useRef(null),{toast:z}=qk();R.useEffect(()=>{L.current&&(L.current.scrollTop=L.current.scrollHeight)},[x]),R.useEffect(()=>{e||v([])},[e]);const j=H_({mutationFn:async K=>await Rh("POST","/api/voice/commands",{utterance:K,inputType:"voice",location:s,chainId:u,journeyId:m}),onSuccess:K=>{const Y={id:K.logId||Date.now().toString(),type:"assistant",text:K.responseText,intent:K.intent,mode:K.mode,timestamp:new Date};if(v(ie=>[...ie,Y]),c&&"speechSynthesis"in window){const ie=new SpeechSynthesisUtterance(K.responseText);ie.rate=1,ie.pitch=1,window.speechSynthesis.speak(ie)}},onError:K=>{z({title:"Command failed",description:K.message||"Could not process your command",variant:"destructive"})}}),V=R.useCallback(K=>{const Y={id:Date.now().toString(),type:"user",text:K,timestamp:new Date};v(ie=>[...ie,Y]),j.mutate(K)},[j]),Z=R.useCallback(K=>{z({title:"Voice Error",description:K,variant:"destructive"})},[z]);return e?M.jsx("div",{className:"fixed inset-0 z-50 bg-black/50 flex items-end justify-center sm:items-center",onClick:K=>{K.target===K.currentTarget&&r()},"data-testid":"voice-panel-overlay",children:M.jsxs(A3,{className:"w-full max-w-md mx-4 mb-4 sm:mb-0 bg-background border shadow-2xl rounded-2xl overflow-hidden max-h-[80vh] flex flex-col",children:[M.jsxs("div",{className:"flex items-center justify-between p-4 border-b bg-muted/50",children:[M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("div",{className:"h-2 w-2 rounded-full bg-green-500 animate-pulse"}),M.jsx("span",{className:"font-semibold text-sm",children:"Slant Voice"})]}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx(sn,{variant:"ghost",size:"icon",onClick:()=>A(!c),className:"h-8 w-8","data-testid":"tts-toggle","aria-label":c?"Disable text-to-speech":"Enable text-to-speech",children:c?M.jsx(J8,{className:"h-4 w-4"}):M.jsx(eV,{className:"h-4 w-4 text-muted-foreground"})}),M.jsx(sn,{variant:"ghost",size:"icon",onClick:r,className:"h-8 w-8","data-testid":"close-voice-panel",children:M.jsx(pg,{className:"h-4 w-4"})})]})]}),M.jsx(YS,{className:"flex-1 p-4 min-h-[200px] max-h-[400px]",ref:L,children:x.length===0?M.jsxs("div",{className:"text-center text-muted-foreground text-sm py-8",children:[M.jsx("p",{className:"mb-2",children:"Tap the mic and say a command"}),M.jsx("p",{className:"text-xs",children:'Try: "Slant, start a night out chain"'})]}):M.jsxs("div",{className:"space-y-3",children:[x.map(K=>M.jsx("div",{className:it("flex",K.type==="user"?"justify-end":"justify-start"),"data-testid":`voice-message-${K.type}`,children:M.jsxs("div",{className:it("max-w-[85%] rounded-2xl px-4 py-2 text-sm",K.type==="user"?"bg-primary text-primary-foreground rounded-br-none":"bg-muted rounded-bl-none"),children:[M.jsx("p",{children:K.text}),K.mode&&K.intent&&M.jsxs("p",{className:"text-xs opacity-70 mt-1",children:[K.mode," → ",K.intent]})]})},K.id)),j.isPending&&M.jsx("div",{className:"flex justify-start",children:M.jsx("div",{className:"bg-muted rounded-2xl rounded-bl-none px-4 py-2",children:M.jsx(xD,{className:"h-4 w-4 animate-spin"})})})]})}),M.jsx("div",{className:"p-4 border-t bg-muted/30 flex items-center justify-center",children:M.jsx(I3,{onTranscript:V,onError:Z,disabled:j.isPending,size:"lg"})}),M.jsxs("div",{className:"px-4 pb-4 flex flex-wrap gap-2 justify-center",children:[M.jsx(T1,{label:"Start chain",onClick:()=>V("Slant, start a new chain"),disabled:j.isPending}),M.jsx(T1,{label:"What's next",onClick:()=>V("Slant, what's next"),disabled:j.isPending}),M.jsx(T1,{label:"Add stop",onClick:()=>V("Slant, save this as a stop"),disabled:j.isPending})]})]})}):null}function T1({label:e,onClick:r,disabled:s}){return M.jsx("button",{onClick:r,disabled:s,className:it("px-3 py-1.5 text-xs rounded-full border","bg-background hover:bg-muted transition-colors","disabled:opacity-50 disabled:cursor-not-allowed"),"data-testid":`quick-command-${e.toLowerCase().replace(/\s+/g,"-")}`,children:e})}const E1=768;function sZ(){const[e,r]=R.useState(void 0);return R.useEffect(()=>{const s=window.matchMedia(`(max-width: ${E1-1}px)`),u=()=>{r(window.innerWidth<E1)};return s.addEventListener("change",u),r(window.innerWidth<E1),()=>s.removeEventListener("change",u)},[]),!!e}const R3=R.forwardRef(({className:e,type:r,...s},u)=>M.jsx("input",{type:r,className:it("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:u,...s}));R3.displayName="Input";var aZ="Separator",sM="horizontal",lZ=["horizontal","vertical"],k3=R.forwardRef((e,r)=>{const{decorative:s,orientation:u=sM,...m}=e,x=cZ(u)?u:sM,c=s?{role:"none"}:{"aria-orientation":x==="vertical"?x:void 0,role:"separator"};return M.jsx(kt.div,{"data-orientation":x,...c,...m,ref:r})});k3.displayName=aZ;function cZ(e){return lZ.includes(e)}var D3=k3;const L3=R.forwardRef(({className:e,orientation:r="horizontal",decorative:s=!0,...u},m)=>M.jsx(D3,{ref:m,decorative:s,orientation:r,className:it("shrink-0 bg-border",r==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...u}));
1298L3.displayName=D3.displayName;const uZ=A0,YJ=rT,dZ=R0,z3=R.forwardRef(({className:e,...r},s)=>M.jsx(vp,{className:it("fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...r,ref:s}));z3.displayName=vp.displayName;const hZ=hg("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),O3=R.forwardRef(({side:e="right",className:r,children:s,...u},m)=>M.jsxs(dZ,{children:[M.jsx(z3,{}),M.jsxs(xp,{ref:m,className:it(hZ({side:e}),r),...u,children:[s,M.jsxs(k0,{className:"absolute right-4 top-4 roun
1298ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[M.jsx(pg,{className:"h-4 w-4"}),M.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));O3.displayName=xp.displayName;const F3=({className:e,...r})=>M.jsx("div",{className:it("flex flex-col space-y-2 text-center sm:text-left",e),...r});F3.displayName="SheetHeader";const j3=R.forwardRef(({className:e,...r},s)=>M.jsx(vg,{ref:s,className:it("text-lg font-semibold text-foreground",e),...r}));j3.displayName=vg.displayName;const N3=R.forwardRef(({className:e,...r},s)=>M.jsx(xg,{ref:s,className:it("text-sm text-muted-foreground",e),...r}));N3.displayName=xg.displayName;function aM({className:e,...r}){return M.jsx("div",{className:it("animate-pulse rounded-md bg-muted",e),...r})}const pZ="sidebar_state",fZ=60*60*24*7,mZ="16rem",gZ="18rem",yZ="3rem",_Z="b",B3=R.createContext(null);function wg(){const e=R.useContext(B3);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const V3=R.forwardRef(({defaultOpen:e=!0,open:r,onOpenChange:s,className:u,style:m,children:x,...v},c)=>{const A=sZ(),[L,z]=R.useState(!1),[j,V]=R.useState(e),Z=r??j,K=R.useCallback(G=>{const J=typeof G=="function"?G(Z):G;s?s(J):V(J),document.cookie=`${pZ}=${J}; path=/; max-age=${fZ}`},[s,Z]),Y=R.useCallback(()=>A?z(G=>!G):K(G=>!G),[A,K,z]);R.useEffect(()=>{const G=J=>{J.key===_Z&&(J.metaKey||J.ctrlKey)&&(J.preventDefault(),Y())};return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[Y]);const ie=Z?"expanded":"collapsed",Q=R.useMemo(()=>({state:ie,open:Z,setOpen:K,isMobile:A,openMobile:L,setOpenMobile:z,toggleSidebar:Y}),[ie,Z,K,A,L,z,Y]);return M.jsx(B3.Provider,{value:Q,children:M.jsx(mL,{delayDuration:0,children:M.jsx("div",{style:{"--sidebar-width":mZ,"--sidebar-width-icon":yZ,...m},className:it("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",u),ref:c,...v,children:x})})})});V3.displayName="SidebarProvider";const U3=R.forwardRef(({side:e="left",variant:r="sidebar",collapsible:s="offcanvas",className:u,children:m,...x},v)=>{const{isMobile:c,state:A,openMobile:L,setOpenMobile:z}=wg();return s==="none"?M.jsx("div",{className:it("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",u),ref:v,...x,children:m}):c?M.jsx(uZ,{open:L,onOpenChange:z,...x,children:M.jsxs(O3,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":gZ},side:e,children:[M.jsxs(F3,{className:"sr-only",children:[M.jsx(j3,{children:"Sidebar"}),M.jsx(N3,{children:"Displays the mobile sidebar."})]}),M.jsx("div",{className:"flex h-full w-full flex-col",children:m})]})}):M.jsxs("div",{ref:v,className:"group peer hidden text-sidebar-foreground md:block","data-state":A,"data-collapsible":A==="collapsed"?s:"","data-variant":r,"data-side":e,children:[M.jsx("div",{className:it("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",r==="floating"||r==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),M.jsx("div",{className:it("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",r==="floating"||r==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",u),...x,children:M.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:m})})]})});U3.displayName="Sidebar";const sT=R.forwardRef(({className:e,onClick:r,...s},u)=>{const{toggleSidebar:m}=wg();return M.jsxs(sn,{ref:u,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:it("h-7 w-7",e),onClick:x=>{r==null||r(x),m()},...s,children:[M.jsx(G8,{}),M.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});sT.displayName="SidebarTrigger";const vZ=R.forwardRef(({className:e,...r},s)=>{const{toggleSidebar:u}=wg();return M.jsx("button",{ref:s,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:u,title:"Toggle Sidebar",className:it("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...r})});vZ.displayName="SidebarRail";const $3=R.forwardRef(({className:e,...r},s)=>M.jsx("main",{ref:s,className:it("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...r}));$3.displayName="SidebarInset";const xZ=R.forwardRef(({className:e,...r},s)=>M.jsx(R3,{ref:s,"data-sidebar":"input",className:it("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...r}));xZ.displayName="SidebarInput";const G3=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,"data-sidebar":"header",className:it("flex flex-col gap-2 p-2",e),...r}));G3.displayName="SidebarHeader";const q3=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,"data-sidebar":"footer",className:it("flex flex-col gap-2 p-2",e),...r}));q3.displayName="SidebarFooter";const bZ=R.forwardRef(({className:e,...r},s)=>M.jsx(L3,{ref:s,"data-sidebar":"separator",className:it("mx-2 w-auto bg-sidebar-border",e),...r}));bZ.displayName="SidebarSeparator";const W3=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,"data-sidebar":"content",className:it("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r}));W3.displayName="SidebarContent";const Z3=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,"data-sidebar":"group",className:it("relative flex w-full min-w-0 flex-col p-2",e),...r}));Z3.displayName="SidebarGroup";const H3=R.forwardRef(({className:e,asChild:r=!1,...s},u)=>{const m=r?fp:"div";return M.jsx(m,{ref:u,"data-sidebar":"group-label",className:it("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground
1298/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...s})});H3.displayName="SidebarGroupLabel";const wZ=R.forwardRef(({className:e,asChild:r=!1,...s},u)=>{const m=r?fp:"button";return M.jsx(m,{ref:u,"data-sidebar":"group-action",className:it("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...s})});wZ.displayName="SidebarGroupAction";const X3=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,"data-sidebar":"group-content",className:it("w-full text-sm",e),...r}));X3.displayName="SidebarGroupContent";const K3=R.forwardRef(({className:e,...r},s)=>M.jsx("ul",{ref:s,"data-sidebar":"menu",className:it("flex w-full min-w-0 flex-col gap-1",e),...r}));K3.displayName="SidebarMenu";const Y3=R.forwardRef(({className:e,...r},s)=>M.jsx("li",{ref:s,"data-sidebar":"menu-item",className:it("group/menu-item relative",e),...r}));Y3.displayName="SidebarMenuItem";const SZ=hg("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Q3=R.forwardRef(({asChild:e=!1,isActive:r=!1,variant:s="default",size:u="default",tooltip:m,className:x,...v},c)=>{const A=e?fp:"button",{isMobile:L,state:z}=wg(),j=M.jsx(A,{ref:c,"data-sidebar":"menu-button","data-size":u,"data-active":r,className:it(SZ({variant:s,size:u}),x),...v});return m?(typeof m=="string"&&(m={children:m}),M.jsxs(b7,{children:[M.jsx(w7,{asChild:!0,children:j}),M.jsx(gL,{side:"right",align:"center",hidden:z!=="collapsed"||L,...m})]})):j});Q3.displayName="SidebarMenuButton";const TZ=R.forwardRef(({className:e,asChild:r=!1,showOnHover:s=!1,...u},m)=>{const x=r?fp:"button";return M.jsx(x,{ref:m,"data-sidebar":"menu-action",className:it("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",s&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...u})});TZ.displayName="SidebarMenuAction";const EZ=R.forwardRef(({className:e,...r},s)=>M.jsx("div",{ref:s,"data-sidebar":"menu-badge",className:it("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...r}));EZ.displayName="SidebarMenuBadge";const PZ=R.forwardRef(({className:e,showIcon:r=!1,...s},u)=>{const m=R.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return M.jsxs("div",{ref:u,"data-sidebar":"menu-skeleton",className:it("flex h-8 items-center gap-2 rounded-md px-2",e),...s,children:[r&&M.jsx(aM,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),M.jsx(aM,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":m}})]})});PZ.displayName="SidebarMenuSkeleton";const CZ=R.forwardRef(({className:e,...r},s)=>M.jsx("ul",{ref:s,"data-sidebar":"menu-sub",className:it("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...r}));CZ.displayName="SidebarMenuSub";const IZ=R.forwardRef(({...e},r)=>M.jsx("li",{ref:r,...e}));IZ.displayName="SidebarMenuSubItem";const MZ=R.forwardRef(({asChild:e=!1,size:r="md",isActive:s,className:u,...m},x)=>{const v=e?fp:"a";return M.jsx(v,{ref:x,"data-sidebar":"menu-sub-button","data-size":r,"data-active":s,className:it("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",r==="sm"&&"text-xs",r==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",u),...m})});MZ.displayName="SidebarMenuSubButton";const J3="/assets/slant-logo-new-DVQoNJM8.png",AZ={creator:{label:"Creator",className:"bg-pink-500/20 text-pink-300 border border-pink-500/40"},influencer:{label:"Influencer",className:"bg-purple-500/20 text-purple-300 border border-purple-500/40"},admin:{label:"Admin",className:"bg-red-500/20 text-red-300 border border-red-500/40"},connector:{label:"Connector",className:"bg-amber-500/20 text-amber-300 border border-amber-500/40"},ambassador:{label:"Connector",className:"bg-amber-500/20 text-amber-300 border border-amber-500/40"}},RZ=[{label:"Create",items:[{title:"Creator Studio",href:"/creator-studio",icon:vD,testId:"nav-creator-studio"},{title:"Reel Studio",href:"/reel-studio",icon:F8,testId:"nav-reel-studio"},{title:"QR Studio",href:"/influencer-qr-studio",icon:_i,testId:"nav-qr-studio"}]},{label:"Grow",items:[{title:"Creator Analytics",href:"/creator-analytics",icon:ln,testId:"nav-creator-analytics"},{title:"Impact Dashboard",href:"/impact-dashboard",icon:I8,testId:"nav-impact-dashboard"}]},{label:"Activate",items:[{title:"Creator Agent",href:"/creator-studio-agent",icon:T8,testId:"nav-creator-agent"},{title:"Chain Pack Studio",href:"/qr-chain-packs",icon:N8,testId:"nav-chain-pack-studio"}]},{label:"Profile",items:[{title:"Become a Creator",href:"/become-creator",icon:rV,testId:"nav-bec
1298ome-creator"}]}],kZ=[{label:"Operations",items:[{title:"Campaign Ops",href:"/admin/chain-ops",icon:ro,testId:"nav-admin-campaign-ops",badgeKey:"campaignOps"},{title:"Share Matrix",href:"/admin/share-matrix",icon:ln,testId:"nav-admin-share-matrix"},{title:"Cash Drops",href:"/admin/cash-drops",icon:O8,testId:"nav-admin-cash-drops"},{title:"Partner Gateway",href:"/integrate",icon:P8,testId:"nav-admin-partner-gateway"},{title:"Outbox",href:"/outreach-queue",icon:b8,testId:"nav-admin-outbox",badgeKey:"outbox"}]},{label:"Inventory",items:[{title:"Ticket Inventory",href:"/admin/ticket-inventory",icon:xS,testId:"nav-admin-ticket-inventory"},{title:"Wristbands",href:"/admin/wristbands",icon:TD,testId:"nav-admin-wristbands"},{title:"Event Readiness",href:"/admin/event-readiness",icon:Wm,testId:"nav-admin-event-readiness",badgeKey:"eventReadiness"}]},{label:"Verticals",items:[{title:"NBA",href:"/admin/nba",icon:f0,testId:"nav-admin-nba"},{title:"AAU",href:"/admin/aau",icon:Yo,testId:"nav-admin-aau"},{title:"Concerts",href:"/admin/concerts",icon:U8,testId:"nav-admin-concerts"},{title:"CFB",href:"/admin/cfb",icon:j8,testId:"nav-admin-cfb"},{title:"NFL Away",href:"/admin/nfl-away",icon:Zm,testId:"nav-admin-nfl-away"}]},{label:"System",items:[{title:"Audit Log",href:"/admin/audit-log",icon:qw,testId:"nav-admin-audit-log"},{title:"Telemetry",href:"/telemetry",icon:pc,testId:"nav-admin-telemetry"},{title:"QA Seed",href:"/admin/qa-seed",icon:z8,testId:"nav-admin-qa-seed"}]}],DZ=[{label:"Connector",items:[{title:"Dashboard",href:"/connector-dashboard",icon:vD,testId:"nav-connector-dashboard"},{title:"Activation Brief",href:"/connector-activation",icon:ev,testId:"nav-connector-activation"},{title:"Readiness",href:"/connector-readiness",icon:Wm,testId:"nav-connector-readiness"},{title:"Campaign Dashboard",href:"/presale",icon:ro,testId:"nav-connector-campaigns"},{title:"Presale Dashboard",href:"/presale",icon:TD,testId:"nav-connector-presale"},{title:"Intro Brief",href:"/connector-model",icon:S8,testId:"nav-connector-intro-brief"}]}];function LZ(e){return e==="admin"?kZ:e==="creator"||e==="influencer"?RZ:e==="connector"||e==="ambassador"?DZ:[]}function zZ(e){return ip({queryKey:["/api/admin/sidebar-counts"],queryFn:async()=>{const r=await fetch("/api/admin/sidebar-counts");return r.ok?(await r.json()).counts??{outbox:0,campaignOps:0,eventReadiness:0}:{outbox:0,campaignOps:0,eventReadiness:0}},enabled:e,refetchInterval:2*60*1e3,retry:!1})}function OZ({count:e}){return!e||e<=0?null:M.jsx("span",{className:it("ml-auto shrink-0","group-data-[collapsible=icon]:hidden","inline-flex items-center justify-center","min-w-[18px] h-[18px] px-1 rounded-full","text-[10px] font-bold leading-none tabular-nums","bg-red-500/80 text-white"),"aria-label":`${e}
1298 pending`,children:e>99?"99+":e})}function FZ(){const{user:e}=Na(),[r]=hc(),s=e==null?void 0:e.role,u=s==="admin",{data:m}=zZ(u);if(!s)return null;const x=LZ(s);if(!x.length)return null;const v=AZ[s];return M.jsxs(U3,{collapsible:"icon",className:"border-r border-slate-700/60 bg-slate-950 shadow-2xl","data-testid":"power-user-sidebar",children:[M.jsx(G3,{className:"p-0 border-b border-slate-700/60",children:M.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[M.jsx("div",{className:"shrink-0 flex items-center bg-black rounded-lg px-2 py-1 group-data-[collapsible=icon]:px-1.5 group-data-[collapsible=icon]:py-1.5",children:M.jsx("img",{src:J3,alt:"Slant",className:"h-7 w-auto object-contain group-data-[collapsible=icon]:h-5"})}),v&&M.jsx("span",{className:it("group-data-[collapsible=icon]:hidden","text-[11px] font-semibold px-2 py-0.5 rounded-full leading-none tracking-wide",v.className),"data-testid":"sidebar-role-badge",children:v.label})]})}),M.jsx(W3,{className:"px-1 py-2 overflow-y-auto",children:x.map(c=>M.jsxs(Z3,{className:"mb-1",children:[M.jsx(H3,{className:it("group-data-[collapsible=icon]:hidden","text-[10px] font-semibold uppercase tracking-widest text-slate-500 px-3 py-1.5"),children:c.label}),M.jsx(X3,{children:M.jsx(K3,{children:c.items.map(A=>{const L=A.href==="/"?r==="/":r.startsWith(A.href),z=A.badgeKey&&m?m[A.badgeKey]:0;return M.jsx(Y3,{children:M.jsx(Q3,{asChild:!0,isActive:L,tooltip:A.title,className:it("rounded-lg mx-1 transition-all duration-150 text-slate-400 hover:text-white hover:bg-slate-800/70",L&&["bg-white/10 text-white font-medium","ring-1 ring-white/10","hover:bg-white/12"]),"data-testid":A.testId,children:M.jsxs(hu,{href:A.href,className:"flex items-center gap-2.5 px-2 py-1.5",children:[M.jsx(A.icon,{className:it("h-4 w-4 shrink-0",L?"text-white":"text-slate-500")}),M.jsx("span",{className:"group-data-[collapsible=icon]:hidden text-sm leading-none",children:A.title}),M.jsx(OZ,{count:z})]})})},A.href+A.testId)})})})]},c.label))}),M.jsx(q3,{className:"p-3 border-t border-slate-700/60",children:M.jsx(sT,{className:it("w-full flex items-center justify-center rounded-lg p-2","text-slate-500 hover:text-white hover:bg-slate-800/70 transition-all duration-150"),"data-testid":"sidebar-collapse-toggle"})})]})}const a2="powerUserSidebarOpen";function jZ(){const{open:e,setOpen:r}=wg();return R.useEffect(()=>{localStorage.setItem(a2,JSON.stringify(e))},[e]),R.useEffect(()=>{function s(u){if(u.key===a2&&u.newValue!==null)try{const m=JSON.parse(u.newValue);r(m)}catch{}}return window.addEventListener("storage",s),()=>window.removeEventListener("storage",s)},[r]),null}function NZ(){const{tracking:e,lastTrackTime:r,nearbyGeofences:s,location:u,error:m}=g$();if(!e)return null;const x=s.length>0,v=r?Math.round((Date.now()-r.getTime())/1e3):null,c=v!==null&&v<120;return M.jsx("div",{className:it("flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium transition-all",x?"bg-green-500/20 text-green-400 border border-green-500/30":c?"bg-blue-500/10 text-blue-400 border border-blue-500/20":"bg-muted text-muted-foreground border border-border"),"data-testid":"geofence-status-indicator",title:x?`Checked in: ${s.join(", ")}`:m?`Location error: ${m}`:r?`Last check: ${r.toLocaleTimeString()}`:"Waiting for location...",children:x?M.jsxs(M.Fragment,{children:[M.jsx(pc,{className:"h-3 w-3 animate-pulse"}),M.jsx("span",{className:"hidden sm:inline",children:"Checked In"})]}):c?M.jsxs(M.Fragment,{children:[M.jsx(vn,{className:"h-3 w-3"}),M.jsx("span",{className:"hidden sm:inline",children:"Tracking"})]}):M.jsxs(M.Fragment,{children:[M.jsx(vn,{className:"h-3 w-3 opacity-50"}),M.jsx("span",{className:"hidden sm:inline",children:"..."})]})})}function D_({children:e}){var Q,G;const[r]=hc(),[s,u]=R.useState(!1),[m,x]=R.useState(!1),[v,c]=R.useState(!1),[A,L]=R.useState(),{user:z}=Na(),{config:j}=P$();R.useEffect(()=>{"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(J=>{L({latitude:J.coords.latitude,longitude:J.coords.longitude})},()=>{})},[]);const Z=z&&["creator","influencer","admin","connector","ambassador"].includes(z.role),K=j.bottomNav,Y=["/campaigns/create","/create-campaign","/trips/new","/trip-planner"].includes(r),ie=(()=>{try{const J=localStorage.getItem(a2);return J!==null?JSON.parse(J):!0}catch{return!0}})();return M.jsxs(V3,{defaultOpen:ie,children:[M.jsx(jZ,{}),M.jsxs("div",{className:"min-h-screen max-w-full overflow-x-hidden bg-background flex w-full",children:[Z&&M.jsx(FZ,{}),M.jsxs($3,{className:"flex min-w-0 flex-col flex-1 min-h-screen",children:[!Y&&M.jsx("header",{className:it("fixed top-0 right-0 z-40 bg-background/95 backdrop-blur-md border-b border-border transition-all duration-200",Z?"left-0 group-has-[[data-sidebar=sidebar]]:md:left-[--sidebar-width]":"left-0"),children:M.jsxs("div",{className:"flex items-center justify-between px-4 py-2 max-w-7xl mx-auto",children:[Z&&M.jsx(sT,{className:"md:hidden mr-2 text-muted-foreground hover:text-foreground","data-testid":"mobile-sidebar-tr
1298igger"}),M.jsx(hu,{href:"/",children:M.jsx("div",{className:"flex items-center bg-black rounded-lg px-3 py-1.5","data-testid":"logo-link",children:M.jsx("img",{src:J3,alt:"Slant.ai",className:"h-12 w-auto object-contain","data-testid":"logo-slant"})})}),M.jsxs("div",{className:"flex items-center space-x-2",children:[!Z&&M.jsx(hu,{href:"/demo/marqus-blakely",children:M.jsxs(sn,{variant:"outline",size:"sm",className:"bg-gradient-to-r from-purple-500/10 to-pink-500/10 border-purple-500/50 text-purple-400 hover:bg-purple-500/20 hover:text-purple-300 text-xs font-medium","data-testid":"button-demo",children:[M.jsx(f0,{className:"h-4 w-4 mr-1"}),"Demo"]})}),Z&&(z==null?void 0:z.role)&&M.jsx("span",{className:"hidden sm:inline-flex text-[11px] font-semibold px-2.5 py-1 rounded-full leading-none tracking-wide border bg-slate-800 text-slate-300 border-slate-600 capitalize","data-testid":"header-role-badge",children:z.role==="ambassador"?"Connector":z.role}),M.jsx(NZ,{}),M.jsx(sn,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground",onClick:()=>x(!0),"data-testid":"button-search",children:M.jsx(SD,{className:"h-5 w-5"})}),M.jsx(fW,{}),M.jsx(sn,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground",onClick:()=>u(!0),"data-testid":"button-settings",children:z!=null&&z.profileImageUrl?M.jsx("img",{src:z.profileImageUrl,alt:"Profile",className:"h-7 w-7 rounded-full object-cover"}):M.jsx("div",{className:"h-7 w-7 rounded-full bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center",children:M.jsx("span",{className:"text-white text-xs font-medium",children:((Q=z==null?void 0:z.firstName)==null?void 0:Q.charAt(0))||((G=z==null?void 0:z.email)==null?void 0:G.charAt(0))||"U"})})})]})]})}),M.jsx("main",{className:it("flex-1 min-w-0 max-w-full overflow-x-hidden bg-background",Y?"pt-0":"pt-16","pb-[calc(5rem+env(safe-area-inset-bottom,0px)+24px)]"),children:e}),M.jsx("nav",{className:it("fixed bottom-0 right-0 z-40 bg-background/95 backdrop-blur-md border-t border-border safe-area-bottom transition-all duration-200",Z?"hidden":"left-0"),children:M.jsx("div",{className:"flex items-center justify-around max-w-lg mx-auto px-2 py-2",children:K.map(J=>{const ue=J.icon,ce=J.href==="/"?r==="/":r.startsWith(J.href);return J.isCreate?M.jsx(hu,{href:J.href,children:M.jsxs("div",{className:"flex flex-col items-center justify-center px-3 py-1","data-testid":`nav-${J.name.toLowerCase()}`,children:[M.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-r from-purple-600 to-pink-600 flex items-center justify-center shadow-lg -mt-4 mb-1",children:M.jsx(ue,{className:"h-6 w-6 text-white"})}),M.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:J.name})]})},J.name):M.jsx(hu,{href:J.href,children:M.jsxs("div",{className:it("flex flex-col items-center justify-center px-3 py-2 rounded-lg transition-colors min-w-[60px]",ce?"text-primary":"text-muted-foreground"),"data-testid":`nav-${J.name.toLowerCase()}`,children:[M.jsx(ue,{className:it("h-6 w-6 mb-1",ce&&"fill-primary/10")}),M.jsx("span",{className:"text-xs font-medium",children:J.name})]})},J.name)})})})]}),M.jsx("button",{onClick:()=>c(!0),className:it("fixed bottom-[calc(5rem+env(safe-area-inset-bottom,0px)+16px)] right-4 z-50","h-14 w-14 rounded-full","bg-primary text-primary-foreground shadow-lg","flex items-center justify-center","hover:bg-primary/90 transition-all","active:scale-95"),"data-testid":"floating-voice-button","aria-label":"Open voice commands",children:M.jsx(Ww,{className:"h-6 w-6"})}),M.jsx(oZ,{isOpen:v,onClose:()=>c(!1),location:A}),M.jsx(I$,{isOpen:s,onClose:()=>u(!1)}),M.jsx(JW,{open:m,onOpenChange:x}),M.jsx(A$,{})]})]})}async function BZ(){if(!("serviceWorker"in navigator))return console.log("Service Worker not supported"),null;try{navigator.serviceWorker.addEventListener("message",r=>{var s;if(((s=r.data)==null?void 0:s.type)==="STALE_ASSET_404"){try{if(sessionStorage.getItem("slant_chunk_reload"))return;sessionStorage.setItem("slant_chunk_reload","1")}catch{return}console.warn("[SW] Stale hashed asset 404 — clearing caches and reloading",r.data.url),tO(),eO().finally(()=>{const u=new URL(window.location.href);u.searchParams.set("_sw",String(Date.now())),window.location.replace(u.toString())})}});const e=await navigator.serviceWorker.register("/sw.js",{scope:"/"});return console.log("Service Worker registered successfully"),e.addEventListener("updatefound",()=>{const r=e.installing;r&&r.addEventListener("statechange",()=>{r.state==="installed"&&navigator.serviceWorker.controller&&(console.log("New service worker available"),r.postMessage({type:"SKIP_WAITING"}))})}),e}catch(e){return console.error("Service Worker registration failed:",e),null}}
1298async function eO(){if(!("serviceWorker"in navigator))return!1;try{const e=await navigator.serviceWorker.getRegistration();return e?(await e.unregister(),!0):!1}catch(e){return console.error("Service Worker unregistration failed:",e),!1}}function tO(){"serviceWorker"in navigator&&navigator.serviceWorker.controller&&navigator.serviceWorker.controller.postMessage({type:"CLEAR_CACHE"})}function P1(e){if(!(e!=null&&e.message))return!1;const r=e.message;return r.includes("Failed to fetch dynamically imported module")||r.includes("Importing a module script failed")||r.includes("error loading dynamically imported module")||/ChunkLoadError/i.test(e.name)||/Loading chunk [\d]+ failed/i.test(r)}async function lM(){try{if(tO(),await eO(),"caches"in window){const r=await caches.keys();await Promise.all(r.map(s=>caches.delete(s)))}}catch{}const e=new URL(window.location.href);e.searchParams.set("_sw",String(Date.now())),window.location.replace(e.toString())}class VZ extends R.Component{constructor(r){super(r),this.handleReload=()=>{if(P1(this.state.error)){this.setState({recovering:!0}),lM();return}window.location.reload()},this.handleRetry=()=>{this.setState({hasError:!1,error:null,recovering:!1})},this.state={hasError:!1,error:null,recovering:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,s){console.error("ErrorBoundary caught an error:",r,s),P1(r)&&!sessionStorage.getItem("slant_chunk_reload")&&(sessionStorage.setItem("slant_chunk_reload","1"),this.setState({recovering:!0}),lM())}render(){if(this.state.hasError){if(this.props.fallback)return this.props.fallback;const r=P1(this.state.error);return M.jsx("div",{className:"min-h-screen bg-slate-900 flex items-center justify-center p-4",children:M.jsxs("div",{className:"max-w-md w-full bg-slate-800 rounded-xl p-8 text-center shadow-xl border border-slate-700",children:[M.jsx("div",{className:"w-16 h-16 bg-amber-500/20 rounded-full flex items-center justify-center mx-auto mb-6",children:M.jsx(Y8,{className:"w-8 h-8 text-amber-500"})}),M.jsx("h1",{className:"text-2xl font-bold text-white mb-3",children:this.state.recovering?"Updating…":"Something went wrong"}),M.jsx("p",{className:"text-slate-400 mb-6",children:this.state.recovering?"A newer version of the app is available. Reloading with a fresh cache…":r?"This page is out of date after a recent update. Reload to get the latest version.":"We hit an unexpected issue. This has been logged and we're working on it."}),!this.state.recovering&&M.jsxs("div",{className:"flex flex-col gap-3",children:[M.jsxs(sn,{onClick:this.handleReload,className:"w-full bg-cyan-500 hover:bg-cyan-600","data-testid":"button-reload",children:[M.jsx(wD,{className:"w-4 h-4 mr-2"}),r?"Reload Latest Version":"Reload Page"]}),!r&&M.jsx(sn,{onClick:this.handleRetry,variant:"outline",className:"w-full border-slate-600 text-slate-300 hover:bg-slate-700","data-testid":"button-retry",children:"Try Again"})]}),this.state.error&&M.jsxs("details",{className:"mt-6 text-left",children:[M.jsx("summary",{className:"text-slate-500 text-sm cursor-pointer hover:text-slate-400",children:"Technical details"}),M.jsx("pre",{className:"mt-2 p-3 bg-slate-900 rounded text-xs text-red-400 overflow-auto max-h-32",children:this.state.error.message})]})]})})}return this.props.children}}function UZ({Component:e,componentProps:r}){const[,s]=hc(),{isAuthenticated:u,isLoading:m}=Na(),{data:x,isLoading:v}=ip({queryKey:["/api/users/me/features"],enabled:u,retry:!1}),c=(x==null?void 0:x.role)==="admin",A=m||u&&v;return R.useEffect(()=>{!A&&!c&&s("/")},[A,c,s]),A?M.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center","data-testid":"loader-production-gate",children:M.jsx("div",{className:"text-white",children:"Loading..."})}):c?M.jsx(e,{...r}):null}function Pt(e){return function(s){return M.jsx(UZ,{Component:e,componentProps:s})}}var $Z=Object.defineProperty,Wv=Object.getOwnPropertySymbols,rO=Object.prototype.hasOwnProperty,nO=Object.prototype.propertyIsEnumerable,cM=(e,r,s)=>r in e?$Z(e,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[r]=s,l2=(e,r)=>{for(var s in r||(r={}))rO.call(r,s)&&cM(e,s,r[s]);if(Wv)for(var s of Wv(r))nO.call(r,s)&&cM(e,s,r[s]);return e},c2=(e,r)=>{var s={};for(var u in e)rO.call(e,u)&&r.indexOf(u)<0&&(s[u]=e[u]);if(e!=null&&Wv)for(var u of Wv(e))r.indexOf(u)<0&&nO.call(e,u)&&(s[u]=e[u]);return s};/**
1299 * @license QR Code generator library (TypeScript)
1300 * Copyright (c) Project Nayuki.
1301 * SPDX-License-Identifier: MIT
1302 */var Du;(e=>{const r=class Ut{constructor(A,L,z,j){if(this.version=A,this.errorCorrectionLevel=L,this.modules=[],this.isFunction=[],A<Ut.MIN_VERSION||A>Ut.MAX_VERSION)throw new RangeError("Version value out of range");if(j<-1||j>7)throw new RangeError("Mask value out of range");this.size=A*4+17;let V=[];for(let K=0;K<this.size;K++)V.push(!1);for(let K=0;K<this.size;K++)this.modules.push(V.slice()),this.isFunction.push(V.slice());this.drawFunctionPatterns();const Z=this.addEccAndInterleave(z);if(this.drawCodewords(Z),j==-1){let K=1e9;for(let Y=0;Y<8;Y++){this.applyMask(Y),this.drawFormatBits(Y);const ie=this.getPenaltyScore();ie<K&&(j=Y,K=ie),this.applyMask(Y)}}m(0<=j&&j<=7),this.mask=j,this.applyMask(j),this.drawFormatBits(j),this.isFunction=[]}static encodeText(A,L){const z=e.QrSegment.makeSegments(A);return Ut.encodeSegments(z,L)}static encodeBinary(A,L){const z=e.QrSegment.makeBytes(A);return Ut.encodeSegments([z],L)}static encodeSegments(A,L,z=1,j=40,V=-1,Z=!0){if(!(Ut.MIN_VERSION<=z&&z<=j&&j<=Ut.MAX_VERSION)||V<-1||V>7)throw new RangeError("Invalid value");let K,Y;for(K=z;;K++){const J=Ut.getNumDataCodewords(K,L)*8,ue=v.getTotalBits(A,K);if(ue<=J){Y=ue;break}if(K>=j)throw new RangeError("Data too long")}for(const J of[Ut.Ecc.MEDIUM,Ut.Ecc.QUARTILE,Ut.Ecc.HIGH])Z&&Y<=Ut.getNumDataCodewords(K,J)*8&&(L=J);let ie=[];for(const J of A){s(J.mode.modeBits,4,ie),s(J.numChars,J.mode.numCharCountBits(K),ie);for(const ue of J.getData())ie.push(ue)}m(ie.length==Y);const Q=Ut.getNumDataCodewords(K,L)*8;
1302m(ie.length<=Q),s(0,Math.min(4,Q-ie.length),ie),s(0,(8-ie.length%8)%8,ie),m(ie.length%8==0);for(let J=236;ie.length<Q;J^=253)s(J,8,ie);let G=[];for(;G.length*8<ie.length;)G.push(0);return ie.forEach((J,ue)=>G[ue>>>3]|=J<<7-(ue&7)),new Ut(K,L,G,V)}getModule(A,L){return 0<=A&&A<this.size&&0<=L&&L<this.size&&this.modules[L][A]}getModules(){return this.modules}drawFunctionPatterns(){for(let z=0;z<this.size;z++)this.setFunctionModule(6,z,z%2==0),this.setFunctionModule(z,6,z%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const A=this.getAlignmentPatternPositions(),L=A.length;for(let z=0;z<L;z++)for(let j=0;j<L;j++)z==0&&j==0||z==0&&j==L-1||z==L-1&&j==0||this.drawAlignmentPattern(A[z],A[j]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(A){const L=this.errorCorrectionLevel.formatBits<<3|A;let z=L;for(let V=0;V<10;V++)z=z<<1^(z>>>9)*1335;const j=(L<<10|z)^21522;m(j>>>15==0);for(let V=0;V<=5;V++)this.setFunctionModule(8,V,u(j,V));this.setFunctionModule(8,7,u(j,6)),this.setFunctionModule(8,8,u(j,7)),this.setFunctionModule(7,8,u(j,8));for(let V=9;V<15;V++)this.setFunctionModule(14-V,8,u(j,V));for(let V=0;V<8;V++)this.setFunctionModule(this.size-1-V,8,u(j,V));for(let V=8;V<15;V++)this.setFunctionModule(8,this.size-15+V,u(j,V));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let A=this.version;for(let z=0;z<12;z++)A=A<<1^(A>>>11)*7973;const L=this.version<<12|A;m(L>>>18==0);for(let z=0;z<18;z++){const j=u(L,z),V=this.size-11+z%3,Z=Math.floor(z/3);this.setFunctionModule(V,Z,j),this.setFunctionModule(Z,V,j)}}drawFinderPattern(A,L){for(let z=-4;z<=4;z++)for(let j=-4;j<=4;j++){const V=Math.max(Math.abs(j),Math.abs(z)),Z=A+j,K=L+z;0<=Z&&Z<this.size&&0<=K&&K<this.size&&this.setFunctionModule(Z,K,V!=2&&V!=4)}}drawAlignmentPattern(A,L){for(let z=-2;z<=2;z++)for(let j=-2;j<=2;j++)this.setFunctionModule(A+j,L+z,Math.max(Math.abs(j),Math.abs(z))!=1)}setFunctionModule(A,L,z){this.modules[L][A]=z,this.isFunction[L][A]=!0}addEccAndInterleave(A){const L=this.version,z=this.errorCorrectionLevel;if(A.length!=Ut.getNumDataCodewords(L,z))throw new RangeError("Invalid argument");const j=Ut.NUM_ERROR_CORRECTION_BLOCKS[z.ordinal][L],V=Ut.ECC_CODEWORDS_PER_BLOCK[z.ordinal][L],Z=Math.floor(Ut.getNumRawDataModules(L)/8),K=j-Z%j,Y=Math.floor(Z/j);let ie=[];const Q=Ut.reedSolomonComputeDivisor(V);for(let J=0,ue=0;J<j;J++){let ce=A.slice(ue,ue+Y-V+(J<K?0:1));ue+=ce.length;const xe=Ut.reedSolomonComputeRemainder(ce,Q);J<K&&ce.push(0),ie.push(ce.concat(xe))}let G=[];for(let J=0;J<ie[0].length;J++)ie.forEach((ue,ce)=>{(J!=Y-V||ce>=K)&&G.push(ue[J])});return m(G.length==Z),G}drawCodewords(A){if(A.length!=Math.floor(Ut.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let L=0;for(let z=this.size-1;z>=1;z-=2){z==6&&(z=5);for(let j=0;j<this.size;j++)for(let V=0;V<2;V++){const Z=z-V,Y=(z+1&2)==0?this.size-1-j:j;!this.isFunction[Y][Z]&&L<A.length*8&&(this.modules[Y][Z]=u(A[L>>>3],7-(L&7)),L++)}}m(L==A.length*8)}applyMask(A){if(A<0||A>7)throw new RangeError("Mask value out of range");for(let L=0;L<this.size;L++)for(let z=0;z<this.size;z++){let j;switch(A){case 0:j=(z+L)%2==0;break;case 1:j=L%2==0;break;case 2:j=z%3==0;break;case 3:j=(z+L)%3==0;break;case 4:j=(Math.floor(z/3)+Math.floor(L/2))%2==0;break;case 5:j=z*L%2+z*L%3==0;break;case 6:j=(z*L%2+z*L%3)%2==0;break;case 7:j=((z+L)%2+z*L%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[L][z]&&j&&(this.modules[L][z]=!this.modules[L][z])}}getPenaltyScore(){let A=0;for(let V=0;V<this.size;V++){let Z=!1,K=0,Y=[0,0,0,0,0,0,0];for(let ie=0;ie<this.size;ie++)this.modules[V][ie]==Z?(K++,K==5?A+=Ut.PENALTY_N1:K>5&&A++):(this.finderPenaltyAddHistory(K,Y),Z||(A+=this.finderPenaltyCountPatterns(Y)*Ut.PENALTY_N3),Z=this.modules[V][ie],K=1);A+=this.finderPenaltyTerminateAndCount(Z,K,Y)*Ut.PENALTY_N3}for(let V=0;V<this.size;V++){let Z=!1,K=0,Y=[0,0,0,0,0,0,0];for(let ie=0;ie<this.size;ie++)this.modules[ie][V]==Z?(K++,K==5?A+=Ut.PENALTY_N1:K>5&&A++):(this.finderPenaltyAddHistory(K,Y),Z||(A+=this.finderPenaltyCountPatterns(Y)*Ut.PENALTY_N3),Z=this.modules[ie][V],K=1);A+=this.finderPenaltyTerminateAndCount(Z,K,Y)*Ut.PENALTY_N3}for(let V=0;V<this.size-1;V++)for(let Z=0;Z<this.size-1;Z++){const K=this.modules[V][Z];K==this.modules[V][Z+1]&&K==this.modules[V+1][Z]&&K==this.modules[V+1][Z+1]&&(A+=Ut.PENALTY_N2)}let L=0;for(const V of this.modules)L=V.reduce((Z,K)=>Z+(K?1:0),L);const z=this.size*this.size,j=Math.ceil(Math.abs(L*20-z*10)/z)-1;return m(0<=j&&j<=9),A+=j*Ut.PENALTY_N4,m(0<=A&&A<=2568888),A}getAlignmentPatternPositions(){if(this.version==1)return[];
1302{const A=Math.floor(this.version/7)+2,L=this.version==32?26:Math.ceil((this.version*4+4)/(A*2-2))*2;let z=[6];for(let j=this.size-7;z.length<A;j-=L)z.splice(1,0,j);return z}}static getNumRawDataModules(A){if(A<Ut.MIN_VERSION||A>Ut.MAX_VERSION)throw new RangeError("Version number out of range");let L=(16*A+128)*A+64;if(A>=2){const z=Math.floor(A/7)+2;L-=(25*z-10)*z-55,A>=7&&(L-=36)}return m(208<=L&&L<=29648),L}static getNumDataCodewords(A,L){return Math.floor(Ut.getNumRawDataModules(A)/8)-Ut.ECC_CODEWORDS_PER_BLOCK[L.ordinal][A]*Ut.NUM_ERROR_CORRECTION_BLOCKS[L.ordinal][A]}static reedSolomonComputeDivisor(A){if(A<1||A>255)throw new RangeError("Degree out of range");let L=[];for(let j=0;j<A-1;j++)L.push(0);L.push(1);let z=1;for(let j=0;j<A;j++){for(let V=0;V<L.length;V++)L[V]=Ut.reedSolomonMultiply(L[V],z),V+1<L.length&&(L[V]^=L[V+1]);z=Ut.reedSolomonMultiply(z,2)}return L}static reedSolomonComputeRemainder(A,L){let z=L.map(j=>0);for(const j of A){const V=j^z.shift();z.push(0),L.forEach((Z,K)=>z[K]^=Ut.reedSolomonMultiply(Z,V))}return z}static reedSolomonMultiply(A,L){if(A>>>8||L>>>8)throw new RangeError("Byte out of range");let z=0;for(let j=7;j>=0;j--)z=z<<1^(z>>>7)*285,z^=(L>>>j&1)*A;return m(z>>>8==0),z}finderPenaltyCountPatterns(A){const L=A[1];m(L<=this.size*3);const z=L>0&&A[2]==L&&A[3]==L*3&&A[4]==L&&A[5]==L;return(z&&A[0]>=L*4&&A[6]>=L?1:0)+(z&&A[6]>=L*4&&A[0]>=L?1:0)}finderPenaltyTerminateAndCount(A,L,z){return A&&(this.finderPenaltyAddHistory(L,z),L=0),L+=this.size,this.finderPenaltyAddHistory(L,z),this.finderPenaltyCountPatterns(z)}finderPenaltyAddHistory(A,L){L[0]==0&&(A+=this.size),L.pop(),L.unshift(A)}};r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=r;function s(c,A,L){if(A<0||A>31||c>>>A)throw new RangeError("Value out of range");for(let z=A-1;z>=0;z--)L.push(c>>>z&1)}function u(c,A){return(c>>>A&1)!=0}function m(c){if(!c)throw new Error("Assertion error")}const x=class $r{constructor(A,L,z){if(this.mode=A,this.numChars=L,this.bitData=z,L<0)throw new RangeError("Invalid argument");this.bitData=z.slice()}static makeBytes(A){let L=[];for(const z of A)s(z,8,L);return new $r($r.Mode.BYTE,A.length,L)}static makeNumeric(A){if(!$r.isNumeric(A))throw new RangeError("String contains non-numeric characters");let L=[];for(let z=0;z<A.length;){const j=Math.min(A.length-z,3);s(parseInt(A.substring(z,z+j),10),j*3+1,L),z+=j}return new $r($r.Mode.NUMERIC,A.length,L)}static makeAlphanumeric(A){if(!$r.isAlphanumeric(A))throw new RangeError("String contains unencodable characters in alphanumeric mode");let L=[],z;for(z=0;z+2<=A.length;z+=2){let j=$r.ALPHANUMERIC_CHARSET.indexOf(A.charAt(z))*45;j+=$r.ALPHANUMERIC_CHARSET.indexOf(A.charAt(z+1)),s(j,11,L)}return z<A.length&&s($r.ALPHANUMERIC_CHARSET.indexOf(A.charAt(z)),6,L),new $r($r.Mode.ALPHANUMERIC,A.length,L)}static makeSegments(A){return A==""?[]:$r.isNumeric(A)?[$r.makeNumeric(A)]:$r.isAlphanumeric(A)?[$r.makeAlphanumeric(A)]:[$r.makeBytes($r.toUtf8ByteArray(A))]}static makeEci(A){let L=[];if(A<0)throw new RangeError("ECI assignment value out of range");if(A<128)s(A,8,L);else if(A<16384)s(2,2,L),s(A,14,L);else if(A<1e6)s(6,3,L),s(A,21,L);else throw new RangeError("ECI assignment value out of range");return new $r($r.Mode.ECI,0,L)}static isNumeric(A){return $r.NUMERIC_REGEX.test(A)}static isAlphanumeric(A){return $r.ALPHANUMERIC_REGEX.test(A)}getData(){return this.bitData.slice()}static getTotalBits(A,L){let z=0;for(const j of A){const V=j.mode.numCharCountBits(L);if(j.numChars>=1<<V)return 1/0;z+=4+V+j.bitData.length}return z}static toUtf8ByteArray(A){A=encodeURI(A);let L=[];for(let z=0;z<A.length;z++)A.charAt(z)!="%"?L.push(A.charCodeAt(z)):(L.push(parseInt(A.substring(z+1,z+3),16)),z+=2);return L}};x.NUMERIC_REGEX=/^[0-9]*$/,x.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,x.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let v=x;e.QrSegment=x})(Du||(Du={}));(e=>{(r=>{const s=class{constructor(m,x){this.ordinal=m,this.formatBits=x}};s.LOW=new s(0,1),s.MEDIUM=new s(1,0),s.QUARTILE=new s(2,3),s.HIGH=new s(3,2),r.Ecc=s})(e.QrCode||(e.QrCode={}))})(Du||(Du={}));(e=>{(r=>{const s=class{constructor(m,x){this.modeBits=m,this.numBitsCharCount=x}numCharCountBits(m){return this.numBitsCharCount[Math.floor((m+7)/17)]}};s.NUMERIC=new s(1,[10,12,14]),s.ALPHANUMERIC=new s(2,[9,11,13]),s.BYTE=new s(4,[8,16,16]),s.KANJI=new s(8,[8,10,12]),s.ECI=new s(7,[0,0,0]),r.Mode=s})(e.QrSegment||(e.QrSegment={}))})(Du||(Du={}));var Th=Du;/**
1303 * @license qrcode.react
1304 * Copyright (c) Paul O'Shannessy
1305 * SPDX-License-Identifier: ISC
1306 */var GZ={L:Th.QrCode.Ecc.LOW,M:Th.QrCode.Ecc.MEDIUM,Q:Th.QrCode.Ecc.QUARTILE,H:Th.QrCode.Ecc.HIGH},iO=128,oO="L",sO="#FFFFFF",aO="#000000",lO=!1,cO=1,qZ=4,WZ=0,ZZ=.1;function uO(e,r=0){const s=[];return e.forEach(function(u,m){let x=null;
1306u.forEach(function(v,c){if(!v&&x!==null){s.push(`M${x+r} ${m+r}h${c-x}v1H${x+r}z`),x=null;return}if(c===u.length-1){if(!v)return;x===null?s.push(`M${c+r},${m+r} h1v1H${c+r}z`):s.push(`M${x+r},${m+r} h${c+1-x}v1H${x+r}z`);return}v&&x===null&&(x=c)})}),s.join("")}function dO(e,r){return e.slice().map((s,u)=>u<r.y||u>=r.y+r.h?s:s.map((m,x)=>x<r.x||x>=r.x+r.w?m:!1))}function HZ(e,r,s,u){if(u==null)return null;const m=e.length+s*2,x=Math.floor(r*ZZ),v=m/r,c=(u.width||x)*v,A=(u.height||x)*v,L=u.x==null?e.length/2-c/2:u.x*v,z=u.y==null?e.length/2-A/2:u.y*v,j=u.opacity==null?1:u.opacity;let V=null;if(u.excavate){let K=Math.floor(L),Y=Math.floor(z),ie=Math.ceil(c+L-K),Q=Math.ceil(A+z-Y);V={x:K,y:Y,w:ie,h:Q}}const Z=u.crossOrigin;return{x:L,y:z,h:A,w:c,excavation:V,opacity:j,crossOrigin:Z}}function XZ(e,r){return r!=null?Math.max(Math.floor(r),0):e?qZ:WZ}function hO({value:e,level:r,minVersion:s,includeMargin:u,marginSize:m,imageSettings:x,size:v,boostLevel:c}){let A=on.useMemo(()=>{const K=(Array.isArray(e)?e:[e]).reduce((Y,ie)=>(Y.push(...Th.QrSegment.makeSegments(ie)),Y),[]);return Th.QrCode.encodeSegments(K,GZ[r],s,void 0,void 0,c)},[e,r,s,c]);const{cells:L,margin:z,numCells:j,calculatedImageSettings:V}=on.useMemo(()=>{let Z=A.getModules();const K=XZ(u,m),Y=Z.length+K*2,ie=HZ(Z,v,K,x);return{cells:Z,margin:K,numCells:Y,calculatedImageSettings:ie}},[A,v,x,u,m]);return{qrcode:A,margin:z,cells:L,numCells:j,calculatedImageSettings:V}}var KZ=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),YZ=on.forwardRef(function(r,s){const u=r,{value:m,size:x=iO,level:v=oO,bgColor:c=sO,fgColor:A=aO,includeMargin:L=lO,minVersion:z=cO,boostLevel:j,marginSize:V,imageSettings:Z}=u,Y=c2(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:ie}=Y,Q=c2(Y,["style"]),G=Z==null?void 0:Z.src,J=on.useRef(null),ue=on.useRef(null),ce=on.useCallback($e=>{J.current=$e,typeof s=="function"?s($e):s&&(s.current=$e)},[s]),[xe,Re]=on.useState(!1),{margin:Ce,cells:re,numCells:se,calculatedImageSettings:ve}=hO({value:m,level:v,minVersion:z,boostLevel:j,includeMargin:L,marginSize:V,imageSettings:Z,size:x});on.useEffect(()=>{if(J.current!=null){const $e=J.current,De=$e.getContext("2d");if(!De)return;let Ze=re;const We=ue.current,Ae=ve!=null&&We!==null&&We.complete&&We.naturalHeight!==0&&We.naturalWidth!==0;Ae&&ve.excavation!=null&&(Ze=dO(re,ve.excavation));const Pe=window.devicePixelRatio||1;$e.height=$e.width=x*Pe;const Ke=x/se*Pe;De.scale(Ke,Ke),De.fillStyle=c,De.fillRect(0,0,se,se),De.fillStyle=A,KZ?De.fill(new Path2D(uO(Ze,Ce))):re.forEach(function(ot,ze){ot.forEach(function(Je,mt){Je&&De.fillRect(mt+Ce,ze+Ce,1,1)})}),ve&&(De.globalAlpha=ve.opacity),Ae&&De.drawImage(We,ve.x+Ce,ve.y+Ce,ve.w,ve.h)}}),on.useEffect(()=>{Re(!1)},[G]);const Me=l2({height:x,width:x},ie);let qe=null;return G!=null&&(qe=on.createElement("img",{src:G,key:G,style:{display:"none"},onLoad:()=>{Re(!0)},ref:ue,crossOrigin:ve==null?void 0:ve.crossOrigin})),on.createElement(on.Fragment,null,on.createElement("canvas",l2({style:Me,height:x,width:x,ref:ce,role:"img"},Q)),qe)});YZ.displayName="QRCodeCanvas";var pO=on.forwardRef(function(r,s){const u=r,{value:m,size:x=iO,level:v=oO,bgColor:c=sO,fgColor:A=aO,includeMargin:L=lO,minVersion:z=cO,boostLevel:j,title:V,marginSize:Z,imageSettings:K}=u,Y=c2(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:ie,cells:Q,numCells:G,calculatedImageSettings:J}=hO({value:m,level:v,minVersion:z,boostLevel:j,includeMargin:L,marginSize:Z,imageSettings:K,size:x});let ue=Q,ce=null;K!=null&&J!=null&&(J.excavation!=null&&(ue=dO(Q,J.excavation)),ce=on.createElement("image",{href:K.src,height:J.h,width:J.w,x:J.x+ie,y:J.y+ie,preserveAspectRatio:"none",opacity:J.opacity,crossOrigin:J.crossOrigin}));const xe=uO(ue,ie);return on.createElement("svg",l2({height:x,width:x,viewBox:`0 0 ${G} ${G}`,ref:s,role:"img"},Y),!!V&&on.createElement("title",null,V),on.createElement("path",{fill:c,d:`M0,0 h${G}v${G}H0z`,shapeRendering:"crispEdges"}),on.createElement("path",{fill:A,d:xe,shapeRendering:"crispEdges"}),ce)});pO.displayName="QRCodeSVG";const C1="https://www.slantchain.com/c/nba-youngboy-rolling-loud";function QZ(){const e=R.useRef(null),r=()=>{window.print()};return M.jsxs("div",{className:"min-h-screen bg-neutral-950 flex flex-col items-center py-8 px-4",children:[M.jsxs("div",{className:"print:hidden flex gap-4 mb-8 items-center",children:[M.jsxs("div",{className:"text-neutral-400 text-sm",children:["QR target:"," ",M.jsx("span",{className:"text-yellow-400 font-mono text-xs",children:C1})]}),M.jsx("button",{"data-testid":"button-print-poster",onClick:r,className:"px-6 py-2 bg-yellow-400 text-black font-bold text-sm uppercase tracking-widest rounded hover:bg-yellow-300 transition-colors",children:"Print / Save PDF"})]}),M.jsxs("div",{ref:e,"data-testid":"poster-container",className:"relative w-[816px] min-h-[1056px] bg-black text-white overflow-hidden print:w-full print:min-h-0",style:{fontFamily:"'Arial Black', 'Helvetica Neue', sans-serif"},children:[M.jsx("div",{className:"absolute inset-0 opacity-5 pointer-events-none",style:{backgroundImage:"repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.08) 3px, rgba(255,255,255,0.08) 4px)"}}),M.jsx("div",{className:"absolute -top-20 -right-20 w-96 h-96 opacity-20 pointer-events-none",style:{background:"conic-gradient(from 135deg, #f5c518, #b8860b, transparent 60%)"}}),M.jsxs("div",{className:"relative bg-yellow-400 px-10 pt-6 pb-4",children:[M.jsxs("div",{className:"flex items-center justify-between",children:[M.jsx("span",{"data-testid":"text-festival-name",className:"text-black text-xs font-black uppercase tracking-[0.35em]",children:"Rolling Loud Festival"}),M.jsx("span",{className:"text-black text-xs font-bold uppercase tracking-widest opacity-70",children:"Official Activation"})]}),M.jsx("div",{className:"mt-2 border-t border-black/20"})]}),M.jsxs("div",{className:"relative px-10 pt-10",children:[M.jsx("p",{className:"text-yellow-400 text-xs font-bold uppercase tracking-[0.5em] mb
1306-2",children:"Presents"}),M.jsx("h1",{"data-testid":"text-artist-name",className:"text-white font-black uppercase leading-none",style:{fontSize:"clamp(48px, 9vw, 88px)",letterSpacing:"-0.02em"},children:"NBA"}),M.jsx("h1",{className:"text-yellow-400 font-black uppercase leading-none",style:{fontSize:"clamp(48px, 9vw, 88px)",letterSpacing:"-0.02em"},children:"YOUNGBOY"}),M.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[M.jsx("div",{className:"h-px flex-1 bg-yellow-400/40"}),M.jsx("span",{className:"text-yellow-400 text-xs font-bold uppercase tracking-[0.4em]",children:"Exclusive Merch Drop"}),M.jsx("div",{className:"h-px flex-1 bg-yellow-400/40"})]})]}),M.jsx("div",{className:"relative px-10 pt-8 pb-6",children:M.jsxs("div",{className:"border border-yellow-400/30 p-6 bg-yellow-400/5",children:[M.jsx("p",{className:"text-neutral-400 text-xs uppercase tracking-widest mb-2",children:"The moment you've been waiting for"}),M.jsx("h2",{"data-testid":"text-headline",className:"text-white font-black uppercase leading-none",style:{fontSize:"clamp(36px, 7vw, 68px)",letterSpacing:"-0.01em"},children:"THE WAIT"}),M.jsx("h2",{className:"text-yellow-400 font-black uppercase leading-none",style:{fontSize:"clamp(36px, 7vw, 68px)",letterSpacing:"-0.01em"},children:"IS OVER."}),M.jsxs("p",{className:"text-neutral-300 text-sm mt-4 leading-relaxed max-w-lg",children:["NBA YoungBoy brings it exclusive — available"," ",M.jsx("strong",{className:"text-white",children:"only at Rolling Loud"}),". Every piece is a collector's item. Once it's gone, it's"," ",M.jsx("span",{className:"text-yellow-400 font-bold",children:"gone for good"}),"."]})]})}),M.jsxs("div",{className:"relative px-10 pb-6",children:[M.jsx("p",{className:"text-yellow-400 text-xs font-bold uppercase tracking-[0.4em] mb-4",children:"What's Dropping"}),M.jsx("div",{className:"grid grid-cols-2 gap-3",children:[{title:"MASA Rhinestone Album Tee & Hoodie",desc:"Bold statement pieces with rhinestone detail — every look unforgettable.",tag:"MASA Era"},{title:"MASA Tour Bandanas",desc:"Make America Slim Again tour style. The ultimate festival accessory.",tag:"Tour Gear"},{title:"What You Is Tee",desc:"A must-have for true fans — iconic track, iconic design, limited run.",tag:"Iconic Track"},{title:"+ Festival-Only Surprise Drops",desc:"Exclusive pieces revealed on the day. Stay close to the booth.",tag:"Day-Of Only"}].map(s=>M.jsxs("div",{"data-testid":`card-merch-${s.tag.replace(/\s+/g,"-").toLowerCase()}`,className:"border border-yellow-400/20 p-4 bg-white/[0.02] hover:bg-white/[0.04] transition-colors",children:[M.jsx("span",{className:"inline-block px-2 py-0.5 bg-yellow-400 text-black text-[9px] font-black uppercase tracking-widest mb-2",children:s.tag}),M.jsx("p",{className:"text-white text-xs font-black uppercase leading-tight mb-1",children:s.title}),M.jsx("p",{className:"text-neutral-400 text-[11px] leading-snug",children:s.desc})]},s.title))})]}),M.jsxs("div",{className:"relative mx-10 border-y border-yellow-400/30 py-4 flex items-center justify-between",children:[M.jsxs("div",{className:"text-center flex-1",children:[M.jsx("p",{className:"text-yellow-400 text-lg font-black uppercase",children:"Sells Out Fast"}),M.jsx("p",{className:"text-neutral-400 text-xs mt-1",children:"Every drop at Rolling Loud moves quick. These pieces will not last through the day."})]}),M.jsx("div",{className:"w-px h-12 bg-yellow-400/30 mx-6"}),M.jsxs("div",{className:"text-center flex-1",children:[M.jsx("p",{className:"text-yellow-400 text-lg font-black uppercase",children:"Get There Early"}),M.jsx("p",{className:"text-neutral-400 text-xs mt-1",children:"First come, first served — no exceptions, no restocks."})]})]}),M.jsxs("div",{className:"relative px-10 pt-6 pb-10 flex gap-8 items-start",children:[M.jsxs("div",{className:"flex-shrink-0 flex flex-col items-center",children:[M.jsx("div",{"data-testid":"qr-code-container",className:"bg-white p-4 rounded-sm shadow-2xl shadow-yellow-400/20",children:M.jsx(pO,{value:C1,size:180,bgColor:"#ffffff",fgColor:"#000000",level:"H",includeMargin:!1})}),M.jsxs("p",{"data-testid":"text-qr-cta",className:"text-yellow-400 text-xs font-black uppercase tracking-widest mt-3 text-center",children:["Scan to Join",M.jsx("br",{}),"the Slime Family"]}),M.jsxs("p",{className:"text-neutral-500 text-[10px] mt-1 text-center font-mono break-all max-w-[180px]",children:["slantchain.com/c/",M.jsx("br",{}),"nba-youngboy-rolling-loud"]})]}),M.jsxs("div",{className:"flex-1 pt-2",children:[M.jsx("p",{className:"text-yellow-400 text-xs font-bold uppercase tracking-[0.4em] mb-5",children:"How to Get There"}),[{num:"01",title:"Open Your Camera",body:"No app needed — works with native iOS and Android camera."},{num:"02",title:"Scan the QR Code",body:"Point your lens at the code on this poster or at the booth snap."},{num:"03",title:"Follow the Pin Drop",body:"Get live directions straight to the official NBA YoungBoy Merch Booth at Rolling Loud."}].map(s=>M.jsxs("div",{className:"flex gap-4 mb-5 last:mb-0",children:[M.jsx("span",{className:"text-yellow-400 font-black text-2xl leading-none w-8 flex-shrink-0",children:s.num}),M.jsxs("div",{children:[M.jsx("p",{className:"text-white text-sm font-black uppercase leading-tight",children:s.title}),M.jsx("p",{className:"text-neutral-400 text-xs leading-snug mt-0.5",children:s.body})]})]},s.num)),M.jsx("div",{className:"mt-6 p-4 border border-yellow-400/30 bg-yellow-400/5",children:M.jsxs("p",{className:"text-neutral-300 text-xs leading-relaxed",children:[M.jsx("strong",{className:"text-white",children:"Early arrival is your only guarantee."})," ","These items will not be available online or after the festival ends. Look for the"," ",M.jsx("span",{className:"text-yellow-400 font-bold",children:"MASA branded banners"})," near the main stage — you can't miss it."]})})]})]}),M.jsxs("div",{className:"relative bg-yellow-400 px-10 py-4 flex items-center justify-between",children:[M.jsx("span",{className:"text-black text-[10px] font-black uppercase tracking-[0.3em]",children:"Rolling Loud Festival"}),M.jsxs("div",{className:"flex items-center gap-2",children:[M.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-black"}),M.jsx("span",{className:"text-black text-[10px] font-black uppercase tracking-[0.3em]",children:"NBA YoungBoy Merch Drop"}),M.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-black"}),M.jsx("span",{className:"text-black text-[10px] font-black uppercase tracking-[0.3em]",children:"Official Activation"})]}),M.jsx("span",{className:"text-black/60 text-[10px] font-bold uppercase tracking-widest",children:"Powered by Slant"})]}),M.jsx("div",{className:"absolute bottom-20 right-6 opacity-[0.04] pointer-events-none select-none",style:{writingMode:"vertical-rl",textOrientation:"mixed",fontSize:80,fontWeight:900,textTransform:"uppercase",letterSpacing:"-0.05em",color:"white"},children:"LIMITED EDITION"})]}),M.jsxs("p",{className:"print:hidden text-neutral-600 text-xs mt-6 text-center max-w-lg",children:["The QR code above is live and functional — it resolves to"," ",M.jsx("span",{className:"text-yellow-400 font-mono",children:C1}),". Update the chain slug in Slant to drop the pin to the exact booth location before going live."]}),M.jsx("style",{children:`
1307        @media print {
1308          body { background: black !important; margin: 0; padding: 0; }
1309          .print\\:hidden { display: none !important; }
1310          .print\\:w-full { width: 100% !important; }
1311          .print\\:min-h-0 { min-height: 0 !important; }
1312        }
1313      `})]})}const uM=R.lazy(()=>ae(()=>import("./not-found-bC_2DaVh.js"),[])),I1=R.lazy(()=>ae(()=>import("./Landing-kavAgr_x.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),JZ=R.lazy(()=>ae(()=>import("./Home-C4jiG6EP.js"),__vite__mapDeps([8,9,10]))),eH=R.lazy(()=>ae(()=>import("./DestinationDetail-BekTVqhd.js"),__vite__mapDeps([11,12,13,14,15,16,9,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]))),tH=R.lazy(()=>ae(()=>import("./Routes-BbQZSXo_.js"),__vite__mapDeps([42,43,15,16,9,17,44,45,38,46,2]))),rH=R.lazy(()=>ae(()=>import("./RouteDetail-DjMX96er.js"),__vite__mapDeps([47,48,49,50,51,7,52,53,16,54,55,56,57,26,58,59,31,60,15,9,17,61,32,62,63,64,65,18,19,66,38,10,27,67,45,68,69,70,71,2,5,72,35,46,40]))),nH=R.lazy(()=>ae(()=>import("./RouteForm-2R09pESC.js"),__vite__mapDeps([73,12,19,74,16,15,9,17,20,18,35,2,75,14]))),iH=R.lazy(()=>ae(()=>import("./CreateRoute-Ce2uz7VF.js"),__vite__mapDeps([76,39,77,18,78,54,15,16,9,17,79,38,80,81,82,83,36,84,85,57]))),oH=R.lazy(()=>ae(()=>import("./Notes-6vfoLhgI.js"),__vite__mapDeps([86,19,15,16,9,17,18,44,2,5,45,46,37]))),sH=R.lazy(()=>ae(()=>import("./Checklists-WRy8ZKjj.js"),__vite__mapDeps([87,19,88,16,15,9,17,18,89,44,5,2,45,46,37,90]))),aH=R.lazy(()=>ae(()=>import("./VideoAnalysis-GiNkp1aU.js"),__vite__mapDeps([91,18,15,16,9,17,74,53,54,78,92,25,80,38,93]))),L_=R.lazy(()=>ae(()=>import("./Discover-UOsDDWMH.js"),__vite__mapDeps([94,95,96,71,97,2,5,25,90]))),lH=R.lazy(()=>ae(()=>import("./ContentWall-BWyqCrTI.js"),__vite__mapDeps([98,54,1,38,40,25]))),cH=R.lazy(()=>ae(()=>import("./CreatorCollection-dCNcdytq.js"),__vite__mapDeps([99,54,35,38,90,100,40,37]))),uH=R.lazy(()=>ae(()=>import("./CreatorStudio-Drt_a0TH.js"),__vite__mapDeps([101,18,54,49,50,19,74,16,88,15,9,17,102,103,104,105,10,106,107,108,109,110,4,111,38,75,112,113,114,51,7,115,65,40,116,36,93,100,35,2,117,118,31,43,67,85,119,45,120,121,122,27,92,5,23,24,25,79,123,32,46,84,124,53,125,126,127,128,44,97,33,34,66]))),dH=R.lazy(()=>ae(()=>import("./Community-8iPup0Vq.js"),__vite__mapDeps([129,18,19,15,16,9,17,2,5,27]))),hH=R.lazy(()=>ae(()=>import("./GroupDetail-DpMW6y_h.js"),__vite__mapDeps([130,15,16,9,17,18,19,35,10,45,96]))),pH=R.lazy(()=>ae(()=>import("./Recommendations-BJ3GDTbs.js"),__vite__mapDeps([131,10]))),fH=R.lazy(()=>ae(()=>import("./Chat-BF8wZtX6.js"),__vite__mapDeps([132,45,133,19,35,59,58,26,31,27,10,100,18,53,16,134,74,77]))),mH=R.lazy(()=>ae(()=>import("./TemplateLibrary-CKdBvHRj.js"),__vite__mapDeps([135,15,16,9,17,49,67,44,110,38]))),gH=R.lazy(()=>ae(()=>import("./VideoDiscovery-CyUYhTKL.js"),__vite__mapDeps([136,54,18,83,74,16,109,72,85,137,59,26,32,29,81,82,15,9,17,36,100,138,75,30,127,25,31]))),yH=R.lazy(()=>ae(()=>import("./UserProfile-CSiQHucB.js"),__vite__mapDeps([139,54,95,96,48,49,50,51,7,78,13,14,30,140,141,35,124,116,2]))),_H=R.lazy(()=>ae(()=>import("./GroupTrips-BFFvqKVN.js"),__vite__mapDeps([142,18,19,74,16,83,30,2,5,103,104]))),vH=R.lazy(()=>ae(()=>import("./TripGroupDetail-dDvlSdrx.js"),__vite__mapDeps([143,18,19,54,15,16,9,17,60,61,59,32,26,31,62,63,64,65,35,103,104,51,45,38,144,85,96,37,145,146,27,10,119,67]))),xH=R.lazy(()=>ae(()=>import("./GroupTripPage-CMQrP5n_.js"),__vite__mapDeps([147,19,27,5,41,38,100]))),bH=R.lazy(()=>ae(()=>import("./GroupTripProposalPage-Db1P7tGy.js"),__vite__mapDeps([148,35,119,58,149,26]))),wH=R.lazy(()=>ae(()=>import("./GroupTripSharePage-CjwWkdVO.js"),__vite__mapDeps([150,31,51]))),SH=R.lazy(()=>ae(()=>import("./GroupTripStatusPage-jiezOxyU.js"),__vite__mapDeps([151,35,51]))),TH=R.lazy(()=>ae(()=>import("./TripInvitePage-W5Jf_7YT.js"),[])),EH=R.lazy(()=>ae(()=>import("./ScoutCheckin-Bj0RdZY8.js"),__vite__mapDeps([152,18,19,85,7,153,115]))),PH=R.lazy(()=>ae(()=>import("./SportsEvents-DcpE1IFg.js"),__vite__mapDeps([154,18,15,16,9,17,44,103,104,31]))),CH=R.lazy(()=>ae(()=>import("./YouthSportsAdmin-C8KJsGYg.js"),__vite__mapDeps([155,18,15,16,9,17,54,85,103,104,144]))),IH=R.lazy(()=>ae(()=>import("./BookingHub-DnW3q28z.js"),__vite__mapDeps([156,54,15,16,9,17,81,82,19,83,7,36,75,62,4,63,64,59,32,26,65,157,158,18,159,88,160,161,141,31,74,28,58,14,61,90,44,162]))),MH=R.lazy(()=>ae(()=>import("./AntiochActivationPage-C4vZiLTS.js"),__vite__mapDeps([163,26,59,164]))),AH=R.lazy(()=>ae(()=>import("./ItineraryBuilder-DwarzE3m.js"),__vite__mapDeps([165,12,92,18,19,54,104,105,166,102,167,103,23,168,15,16,9,17,20,88,78,83,61,48,49,50,51,7,169,29,170,171,172,32,34,173,33,5,93,85,35,75,174,124,175,26,69,106,59,31,46,14]))),dM=R.lazy(()=>ae(()=>import("./PrivacySettings-ndYGlIG1.js"),__vite__mapDeps([176,83,19,134,16,18,100,118,30,85,2,177,144]))),hM=R.lazy(()=>ae(()=>import("./TermsOfServicePage-dastSXQx.js"),__vite__mapDeps([178,35]))),RH=R.lazy(()=>ae(()=>import("./ChainExplorer-C8wBNT7U.js"),__vite__mapDeps([179,15,16,9,17,54,180,12,43,20,18,19,74,134,181,88,83,121,30,21,22,182,183,62,184,31,100,2,5,68,14,44,67,175,32,185]))),kH=R.lazy(()=>ae(()=>import("./ChainDetail-Dlg14U3m.js"),__vite__mapDeps([186,187,103,104,160,27,183,97,174,188,189,23,18,19,15,16,9,17,43,190,88,168,30,162,85,74,191,192,193,194,38,78,195,196,197,29,158,159,4,161,82,141,31,54,28,26,58,59,14,180,12,20,134,181,83,121,21,22,182,62,184,100,2,5,68,170,171,114,77,198,133,35,199,10,185,200,201,202,115,203,140,3,51,118,122,65,25,149,63,64,119]))),DH=R.lazy(()=>ae(()=>import("./CertificatePage-D8zC1ftW.js"),__vite__mapDeps([204,140,118,4,31])));R.lazy(()=>ae(()=>import("./ChainSlugRedirect-B1gC2aHn.js"),__vite__mapDeps([205,5])));const LH=R.lazy(()=>ae(()=>import("./Wallet-ClotqESm.js"),__vite__mapDeps([206,201,54,78,74,16,18,15,9,17,2,207,3,160,10,208,191,85,5,144,195,141,209,31,65,199]))),zH=R.lazy(()=>ae(()=>import("./SlantLive-DjChSMos.js"),__vite__mapDeps([210,54,20,12,18,15,16,9,17,74,25,24,211,38,14]))),OH=R.lazy(()=>ae(()=>import("./TravelerDashboard-CvVBkLAO.js"),__vite__mapDeps([212,54,78,80,2,29,31]))),F
1313H=R.lazy(()=>ae(()=>import("./Marketplace-BkLNjznC.js"),__vite__mapDeps([213,54,20,12,18,15,16,9,17,19,140,160,14]))),jH=R.lazy(()=>ae(()=>import("./UnifiedDashboard-B83NWckK.js"),__vite__mapDeps([214,54,78,33,199,67,31,215,85,5,216]))),NH=R.lazy(()=>ae(()=>import("./OnboardingWizard-rKQIeecN.js"),__vite__mapDeps([217,78,134,16,18,88,74,53,54,57,66,4,218,32,137,33,23,199,175,207,128]))),BH=R.lazy(()=>ae(()=>import("./HighlightReelStudio-UuQOZ9ed.js"),__vite__mapDeps([219,19,54,15,16,9,17,78,49,50,199,38,67,112,100,93,25,51]))),VH=R.lazy(()=>ae(()=>import("./CreatorAnalyticsDashboard-B-A2qFRM.js"),__vite__mapDeps([220,78,140,125,17,9,2,141,4,31,54,15,16,199,118,38,196,208,221,222,22,82,223,224,225]))),UH=R.lazy(()=>ae(()=>import("./BecomeCreator-Bu0Kj8C6.js"),__vite__mapDeps([226,4,199,67,160,25]))),$H=R.lazy(()=>ae(()=>import("./PresaleDashboard-DRJ8aKrW.js"),__vite__mapDeps([227,18,19,78,54,15,16,9,17,35,38,208,228,229,174,44,46,160,59,26]))),GH=R.lazy(()=>ae(()=>import("./MerchantPortal-1s7kIChV.js"),__vite__mapDeps([230,54,18,19,15,16,9,17,67,38,228,160]))),qH=R.lazy(()=>ae(()=>import("./CampaignPresaleLanding-BMMJfIRj.js"),__vite__mapDeps([231,18,19,15,16,9,17,1,160,4,229]))),WH=R.lazy(()=>ae(()=>import("./PartnerPresaleLanding-d8yNuI2l.js"),__vite__mapDeps([232,18,19,15,16,9,17,31,160,4,229]))),ZH=R.lazy(()=>ae(()=>import("./MerchantQuickStart-CilowdFB.js"),__vite__mapDeps([233,88,16,18,78,4,160]))),HH=R.lazy(()=>ae(()=>import("./NFLMadridDemo-DK83u_2E.js"),__vite__mapDeps([234,54,78,25,4,23,114]))),XH=R.lazy(()=>ae(()=>import("./NFLEuropeHub-DjaJkNiT.js"),__vite__mapDeps([235,236,237,57,238,138,26,2]))),KH=R.lazy(()=>ae(()=>import("./NFLEuropeCityPage-D1PFAdpN.js"),__vite__mapDeps([239,54,236,35,2,64,26,17,9,34,32,31]))),YH=R.lazy(()=>ae(()=>import("./NFLEuropeMerchantJoin-CqD8yrcY.js"),__vite__mapDeps([240,12,19,20,18,15,16,9,17,236,35,4,241,14]))),QH=R.lazy(()=>ae(()=>import("./NFLEuropeCreatorBrief-CGnyNtTe.js"),__vite__mapDeps([242,12,20,18,15,16,9,17,236,35,51,2,27,4,228,243,14]))),JH=R.lazy(()=>ae(()=>import("./NFLEuropeOps-C5cb7Eap.js"),__vite__mapDeps([244,54,15,16,9,17,23,4,228,243,44,144,31,2]))),pM=R.lazy(()=>ae(()=>import("./NFLEuropePass-DLJhytTo.js"),__vite__mapDeps([245,236,26,64,195,4]))),eX=R.lazy(()=>ae(()=>import("./NflCityLandingPage-BzCLvFi4.js"),__vite__mapDeps([246,236,7,4]))),tX=R.lazy(()=>ae(()=>import("./SportEuropeMapPage-tKKw_exV.js"),__vite__mapDeps([247,237,57,238,138,35]))),rX=R.lazy(()=>ae(()=>import("./PartnersPage-CZNG3hkX.js"),__vite__mapDeps([248,12,19,120,121,9,1,20,18,15,16,17,4,123,14]))),nX=R.lazy(()=>ae(()=>import("./MRaaSPage-D5gtPDMV.js"),__vite__mapDeps([249,12,19,20,18,1,4,31,2,140,117,5,14]))),fM=R.lazy(()=>ae(()=>import("./ProfessionalDirectory-CfBsdJPw.js"),__vite__mapDeps([250,18,19,15,16,9,17,85,2]))),mM=R.lazy(()=>ae(()=>import("./ProfessionalProfile-BPPIrsmp.js"),__vite__mapDeps([251,18,19,35,85,31,2,228,38,62,252,51]))),iX=R.lazy(()=>ae(()=>import("./MRaaSAdminPage-B17ys93_.js"),__vite__mapDeps([253,254,15,16,9,17,43,54,31,4,144]))),gM=R.lazy(()=>ae(()=>import("./MRaaSReportPage-BXHNl-fL.js"),__vite__mapDeps([255,1,35,256,4,222,22,82,223,225,31]))),oX=R.lazy(()=>ae(()=>import("./MajorityReportLibrary-iIs6omXF.js"),__vite__mapDeps([257,19,18,254,5,31,118,7,195,4]))),sX=R.lazy(()=>ae(()=>import("./FlywheelDiagram-BjUkq1yy.js"),__vite__mapDeps([258,259,260]))),aX=R.lazy(()=>ae(()=>import("./PilotBrief-B_99Q-Bd.js"),__vite__mapDeps([261,35,17,9]))),lX=R.lazy(()=>ae(()=>import("./LayerPresentation-Ct-h5aDy.js"),__vite__mapDeps([262,192]))),cX=R.lazy(()=>ae(()=>import("./EventBrief-2ozCjIRg.js"),__vite__mapDeps([263,17,9]))),uX=R.lazy(()=>ae(()=>import("./ConnectorModel-jeBHXgks.js"),__vite__mapDeps([264,17,9]))),dX=R.lazy(()=>ae(()=>import("./OperatorBriefs-dE3RLi53.js"),__vite__mapDeps([265,260,35,17,9]))),hX=R.lazy(()=>ae(()=>import("./RollingLoudDrop-CW-kgbY_.js"),__vite__mapDeps([266,200,67,4,5,197,160]))),pX=R.lazy(()=>ae(()=>import("./ChainPlanAdoptPage-AzCsw2WH.js"),__vite__mapDeps([267,78,18,88,16,4,30,209,31,268,54,85,160,181,83,121,17,9,190,168,162,27,115,7,237,57,238,138,198,133,19,35,199,10,185,5,149,26,64,63,140]))),fX=R.lazy(()=>ae(()=>import("./ChainPlanCampaignPage-CqP1-jD5.js"),[])),yM=R.lazy(()=>ae(()=>import("./MeninasTourPage-CvmzC4Qh.js"),__vite__mapDeps([269,35]))),mX=R.lazy(()=>ae(()=>import("./WcMiamiPage-Cz50UXPu.js"),__vite__mapDeps([270,271,195,3,31]))),gX=R.lazy(()=>ae(()=>import("./PartnerGateway-DDMzANpx.js"),__vite__mapDeps([272,19,18,15,16,9,17,31,184,85,2]))),yX=R.lazy(()=>ae(()=>import("./PartnerGatewayOps-XqHa98GR.js"),__vite__mapDeps([273,54,15,16,9,17,19,18,35,7,115,31,85,10,37,169,146,51,26,118,25]))),_X=R.lazy(()=>ae(()=>import("./CreatorVolleyballDemo-Ct844Bih.js"),__vite__mapDeps([274,78,74,16,49,275,15,9,17,4,118,23,197,229,195,184,209,25,27,10,138,106,38,44,2,218,107,123,110,5,51,160]))),vX=R.lazy(()=>ae(()=>import("./AngelReeseDemo-CsV6ZPtL.js"),__vite__mapDeps([276,78,49,275,15,16,9,17,4,118,23,195,229,184,31,67,27,10,138,160,106,25,5,2,218,107,123,110,51]
1313))),xX=R.lazy(()=>ae(()=>import("./InfluenceTrackingDemo-BG7qnoXd.js"),__vite__mapDeps([277,1,49,275,15,16,9,17,78,4,118,23,31,25,67,184,38,138,209,32,2,107,123,110,5,51,160,27,62,218]))),bX=R.lazy(()=>ae(()=>import("./QuickCutsDemoPage-CZoYf8HH.js"),__vite__mapDeps([278,54,1,275,15,16,9,17,78,4,118,25,31,184]))),wX=R.lazy(()=>ae(()=>import("./QROnboarding-DkUPJuUI.js"),__vite__mapDeps([279,18,78,201,184,4,51,118,2,140,125]))),SX=R.lazy(()=>ae(()=>import("./QRAuthLanding--IC-k57g.js"),__vite__mapDeps([280,184,144,4,125]))),TX=R.lazy(()=>ae(()=>import("./CampaignOnboardingPage-NoPIg7mL.js"),__vite__mapDeps([281,12,18,19,110,109,107,14]))),EX=R.lazy(()=>ae(()=>import("./InfluencerQRStudio-Em_Z8gaa.js"),__vite__mapDeps([282,18,19,15,16,9,17,54,100,36,51,118]))),PX=R.lazy(()=>ae(()=>import("./EventsList-BEAjaqIW.js"),__vite__mapDeps([283,15,16,9,17,44,103,104]))),CX=R.lazy(()=>ae(()=>import("./EventDetail-C0F0Gg52.js"),__vite__mapDeps([284,54,18,19,35,103,104,85,7,2,31,117]))),IX=R.lazy(()=>ae(()=>import("./PitchDeck-B-7RWbSx.js"),__vite__mapDeps([285,78,4,2,25,23,24,56]))),MX=R.lazy(()=>ae(()=>import("./KevinHartTourDemo-C4Nvo3Oq.js"),__vite__mapDeps([286,54,78,23,117,2,67,114,32,26,27,140,160,80,287]))),AX=R.lazy(()=>ae(()=>import("./LasVegasConferenceDemo-BioquK-Y.js"),__vite__mapDeps([288,54,78,23,123,289,290,80,184,175,26,59,2,32,291,173,197,140,160,218,287]))),_M=R.lazy(()=>ae(()=>import("./PharrellWilliamsDemo-DhihMHHp.js"),__vite__mapDeps([292,54,78,67,2,39,85,117,160,114,216,140,25]))),RX=R.lazy(()=>ae(()=>import("./EventAgenda-Im9rOLLT.js"),__vite__mapDeps([293,103,104,114,32,172,290,117]))),kX=R.lazy(()=>ae(()=>import("./AthleteChainJoin-TVQKCoI3.js"),__vite__mapDeps([294,190,18,88,16,168,30,162,27,85,103,104,111,160,26,59,31,7,115]))),DX=R.lazy(()=>ae(()=>import("./ShareableDiscounts-DNP1nXgd.js"),__vite__mapDeps([295,18,160,51,31,59,26,296,104,111]))),vM=R.lazy(()=>ae(()=>import("./AthleteAnalytics-D9TKe124.js"),__vite__mapDeps([297,15,16,9,17,78,54,38,298,160,208,221,145,167,102,103,104]))),LX=R.lazy(()=>ae(()=>import("./NILDashboard-C1hGveZI.js"),__vite__mapDeps([299,54,18,19,15,16,9,17,4,110,107,10,38,27,51,31]))),zX=R.lazy(()=>ae(()=>import("./NILFollowPage-iBWnWVvA.js"),__vite__mapDeps([300,18,88,16,4]))),OX=R.lazy(()=>ae(()=>import("./AthleteFanPage-Ce9V_olY.js"),__vite__mapDeps([301,85,110,107,31]))),xM=R.lazy(()=>ae(()=>import("./CreatorOnboarding-AUcwscvm.js"),__vite__mapDeps([302,78,160,125,4]))),FX=R.lazy(()=>ae(()=>import("./MyEvents-C_JXFvWp.js"),__vite__mapDeps([303,54,144,304,166,104,103,31,106,4]))),jX=R.lazy(()=>ae(()=>import("./SocialAccountsSettings-6JptPCLd.js"),__vite__mapDeps([305,83,43,49,13,14,35,4,306,107,108,109,110,31,100,30]))),NX=R.lazy(()=>ae(()=>import("./PublicSlideViewer-DjrLi28R.js"),__vite__mapDeps([307,49,23,24,25,38]))),BX=R.lazy(()=>ae(()=>import("./ProfileSettings-CP3W1R18.js"),__vite__mapDeps([308,12,19,18,74,16,78,20,35,7,2,75,27,115,5,14]))),bM=R.lazy(()=>ae(()=>import("./QRLanding-7Z4LMDUt.js"),__vite__mapDeps([309,1,268,18,54,85,160,181,88,16,83,121,30,17,9,190,168,162,27,115,7]))),VX=R.lazy(()=>ae(()=>import("./SimpleCreatorUpload-jtct6F63.js"),__vite__mapDeps([310,81,82,19,18,78,35,36,100,51,31]))),UX=R.lazy(()=>ae(()=>import("./PublicAssetViewer-BruXxZOD.js"),__vite__mapDeps([311,100]))),$X=R.lazy(()=>ae(()=>import("./RewardsPage-DkDsYdzN.js"),__vite__mapDeps([312,78,13,14,137,160,5,4]))),GX=R.lazy(()=>ae(()=>import("./IdentityCapital-D4NkL_VB.js"),__vite__mapDeps([313,78,199,184,67,80,118,208]))),qX=R.lazy(()=>ae(()=>import("./CeoAccessPage-CXKQB2eK.js"),__vite__mapDeps([314,78,1,67,4,5,25,184]))),WX=R.lazy(()=>ae(()=>import("./CeoQrDisplay-T9ML5Rf-.js"),__vite__mapDeps([315,51,118,31]))),ZX=R.lazy(()=>ae(()=>import("./CannabisEventDemo-C0DzamT6.js"),__vite__mapDeps([316,18,88,16,15,9,17,54,38,290,32,117,317,35,141,4,118,106,7,103,104,318,114]))),HX=R.lazy(()=>ae(()=>import("./EventExperience-C9Ypz4BC.js"),__vite__mapDeps([319,54,15,16,9,17,103,104,117,124,44,40,26,58,31,317]))),XX=R.lazy(()=>ae(()=>import("./EventRegistration-DvOdRd1M.js"),__vite__mapDeps([320,18,88,16,15,9,17,103,104,141]))),KX=R.lazy(()=>ae(()=>import("./EventRegistrationConfirmation-B1ycY0gd.js"),__vite__mapDeps([321,190,18,88,16,168,30,162,27,85,4,103,104,118,106,7]))),wM=R.lazy(()=>ae(()=>import("./DirectMailDemo-Bf5ocWqp.js"),__vite__mapDeps([322,18,323,80,184,7,23,160,141,140,169,118,138,25,24,4,256,10,51]))),YX=R.lazy(()=>ae(()=>import("./ReadinessCheckIn-BtP-yRr9.js"),__vite__mapDeps([324,88,16,78,325,4,171,170,195,211,169]))),QX=R.lazy(()=>ae(()=>import("./DestinationVideoDemo-CB5wh-Xr.js"),__vite__mapDeps([326,78,25,184,289,172,32,24,128,4,68,51,123,174,118,38,141,189,323]))),JX=R.lazy(()=>ae(()=>import("./SlantRoutesPreview-BF1Y77D7.js"),__vite__mapDeps([327,78,54,4,90,69,126,25,38,36,140,32,141,26,149,115,153,138]))),eK=R.lazy(()=>ae(()=>import("./MarquisBlakelyDemo-msqW20Ot.js"),__vite__mapDeps([328,78,74,16,49,275,15,9,17,4,118,291,23,197,229,195,184,31,25,27,38,44,2,218,107,123,110,194,5,10,115,160,138,32,67]))),tK=R.lazy(()=>ae(()=>import("./Destinations-Dhyld-OD.js"),__vite__mapDeps([329,15,16,9,17,52,53,54,55,56,38,194,172,59]))),rK=R.lazy(()=>ae(()=>import("./StaffRedemption-CJentAyT.js"),__vite__mapDeps([330,209,4,144]))),nK=R.lazy(()=>ae(()=>import("./CampaignDashboard-BU3iLMLj.js"),__vite__mapDeps([331,19,18,54,27,85,10,332,78,15,16,9,17,55,209,125,208,144,4]))),iK=R.lazy(()=>ae(()=>import("./TelemetryDashboard-CovuGOBD.js"),__vite__mapDeps([333,15,16,9,17,254,44]))),oK=R.lazy(()=>ae(()=>import("./CampaignIntelligence-ChkxgdJn.js"),__vite__mapDeps([334,54,78,15,16,9,17,5,80,67,29,196,85,144]))),sK=R.lazy(()=>ae(()=>import("./CampaignOpsPage-DXBHjhw7.js"),__vite__mapDeps([335,25,70,80,144,4,9,68,125]))),aK=R.lazy(()=>ae(()=>import("./CreatorStudioAgentPage-CR0KUtiU.js"),__vite__mapDeps([336,18,19,54,4,125,9,337,25,211,38,10]))),lK=R.lazy(()=>ae(()=>import("./CreateChainWizardPage-aM4nLr2W.js"),__vite__mapDeps([338,18,19,195,4,31,125,3,66,35]))),cK=R.lazy(()=>ae(()=>import("./StartChainPage-CmNx011Q.js"),__vite__mapDeps([339,25,218]))),uK=R.lazy(()=>ae(()=>import("./ChainArrivalDashboardPage-akIfd4D8.js"),__vite__mapDeps([340,35,4]))),dK=R.lazy(()=>ae(()=>import("./MaturityModelPage-CDkWRSkQ.js"),__vite__mapDeps([341,192,17,9,2]))),hK=R.lazy(()=>ae(()=>import("./CreateCampaignPage-DxsJXSXa.js"),__vite__mapDeps([342,343,74,16,18,124,88,5,160,
1313174,38,13,14,332,12,19,78,53,43,15,9,17,20,344,83,123,4,144,36,211,24,25,169,125,35,51,31,100,118,241,7,27,337,229,345,75]))),pK=R.lazy(()=>ae(()=>import("./TripPlannerPage-CXmfv5tc.js"),__vite__mapDeps([346,92,18,19,78,35,9,66,93]))),fK=R.lazy(()=>ae(()=>import("./EditCampaignPage-DZfVs4VG.js"),__vite__mapDeps([347,343,74,16,18,124,88,5,160,174,38,13,14,332,12,19,54,15,9,17,20,35,119,51,7,75,118]))),mK=R.lazy(()=>ae(()=>import("./CampaignBillingPage-B-u1w9wA.js"),__vite__mapDeps([348,18,88,16,35,85,7,115,141,71,62,153]))),gK=R.lazy(()=>ae(()=>import("./CampaignDetailPage-UZtgxawL.js"),__vite__mapDeps([349,332,350,43,18,19,74,16,229,160,188,174,15,9,17,88,27,124,195,254,71,4,68,351,31,103,104,25,24,45,119,35,352,2]))),yK=R.lazy(()=>ae(()=>import("./VenueClaimPage-C9GO9J1d.js"),__vite__mapDeps([353,18,35,85,144,195,141,209]))),_K=R.lazy(()=>ae(()=>import("./StaffScannerPage-DIRr27TM.js"),__vite__mapDeps([354,35,4,144,169,355]))),vK=R.lazy(()=>ae(()=>import("./TicketDashboardPage-RcC6Mrac.js"),__vite__mapDeps([356,35,4,144,177]))),xK=R.lazy(()=>ae(()=>import("./AdminTicketInventory-C6yB4OxA.js"),__vite__mapDeps([357,15,16,9,17,18,36,157,85]))),bK=R.lazy(()=>ae(()=>import("./TicketSearchPage-BCfZrJEI.js"),__vite__mapDeps([358,15,16,9,17,2,31]))),wK=R.lazy(()=>ae(()=>import("./TicketJobAid-CFtsIo4o.js"),__vite__mapDeps([359,256,289,9,85,30,31]))),SK=R.lazy(()=>ae(()=>import("./NflEuropeAdScan-BLb8Y5YT.js"),__vite__mapDeps([360,195,3,271,31,115,4]))),TK=R.lazy(()=>ae(()=>import("./NflEuropeAdSheet-DsuW22to.js"),__vite__mapDeps([361,35,31,256]))),M1=R.lazy(()=>ae(()=>import("./MeninasAdSheet-B5RefUgv.js"),__vite__mapDeps([362,1,171]))),EK=R.lazy(()=>ae(()=>import("./QASeedPanel-BJZwaHgn.js"),__vite__mapDeps([363,15,16,9,17,18,35,364,191,85,144,31,119]))),PK=R.lazy(()=>ae(()=>
1313import("./TicketDetailPage-DMEOr81L.js"),__vite__mapDeps([365,35,31,51,141,85]))),CK=R.lazy(()=>ae(()=>import("./TicketSuccessPage-DRC1mTCX.js"),__vite__mapDeps([366,85]))),IK=R.lazy(()=>ae(()=>import("./GeofenceCreatePage-CQDYQtwt.js"),__vite__mapDeps([367,12,18,19,74,16,15,9,17,20,344,83,123,4,144,368,14,369,35,355,345,75]))),MK=R.lazy(()=>ae(()=>import("./GeofenceDetailPage-NEbmpfSe.js"),__vite__mapDeps([370,344,83,123,4,144,371,369,14,35,119]))),AK=R.lazy(()=>ae(()=>import("./GeofenceEditPage-BMKCUlOX.js"),__vite__mapDeps([372,12,18,19,74,16,15,9,17,20,344,83,123,4,144,368,14,371,369,35,355,345,75]))),RK=R.lazy(()=>ae(()=>import("./GeofenceListPage-BUqyFLVu.js"),__vite__mapDeps([373,371,369,14,4,144,119]))),kK=R.lazy(()=>ae(()=>import("./CreatorRecognition-EddCMC3Z.js"),__vite__mapDeps([374,78,38,140,67,5]))),DK=R.lazy(()=>ae(()=>import("./EventCreatorWizard-CszSJiyV.js"),__vite__mapDeps([375,18,19,88,16,15,9,17,23]))),LK=R.lazy(()=>ae(()=>import("./EventHostHub-CYlcU1zT.js"),__vite__mapDeps([376,78,54,38,103,104,377,71,304,166,102,296]))),zK=R.lazy(()=>ae(()=>import("./EventKitReview-CVyS_4H0.js"),__vite__mapDeps([378,18,54,15,16,9,17,35,38,75,66]))),OK=R.lazy(()=>ae(()=>import("./EventManagement-B4iDwOm2.js"),__vite__mapDeps([379,18,19,54,254,15,16,9,17,35,380,85]))),SM=R.lazy(()=>ae(()=>
1313import("./EventCheckinScanner-LzXSwGH8.js"),__vite__mapDeps([381,35,85,144]))),FK=R.lazy(()=>ae(()=>import("./EventAnalytics-CF_wJyzT.js"),__vite__mapDeps([382,254,35,85,380,118]))),jK=R.lazy(()=>ae(()=>import("./ConnectorDashboard-L6vSbdgM.js"),__vite__mapDeps([383,54,15,16,9,17,254,72,118,195,222,22,82,224]))),TM=R.lazy(()=>ae(()=>import("./ConnectorActivationForm-DDjnjY4h.js"),__vite__mapDeps([384,12,19,20,18,15,16,9,17,88,4,5,35,118,123,195,14]))),EM=R.lazy(()=>ae(()=>import("./ConnectorReadiness-Dgc1y4de.js"),__vite__mapDeps([385,35,118,123,70,4]))),A1=R.lazy(()=>ae(()=>import("./ReportsHub-CvzHqNzq.js"),__vite__mapDeps([386,54,78,15,16,9,17,35,2,85,38,228,25,27,30]))),NK=R.lazy(()=>ae(()=>import("./CampaignReports-D4xLVIvD.js"),__vite__mapDeps([387,54,78,18,15,16,9,17,43,35,24,25,4,119,75,118,7,51,2,38,228,222,22,82,223,30]))),BK=R.lazy(()=>ae(()=>import("./InvestorBriefs-BZ3e6n6E.js"),__vite__mapDeps([388,389,35,118,200]))),VK=R.lazy(()=>ae(()=>import("./ActivationGuides-CnVAknOq.js"),__vite__mapDeps([390,118]))),UK=R.lazy(()=>ae(()=>import("./QrStudioPage-Bg7qtfXm.js"),__vite__mapDeps([391,18,4,118,62]))),$K=R.lazy(()=>ae(()=>import("./QrChainPackStudio-DzfgZ2cF.js"),__vite__mapDeps([392,12,19,15,16,9,17,20,18,174,393,4,38,14]))),GK=R.lazy(()=>ae(()=>import("./TravelerPackView-CGGkvF1u.js"),__vite__mapDeps([394,23,174,118,4]))),qK=R.lazy(()=>ae(()=>import("./ActivationReportPage-B5KEzXGP.js"),__vite__mapDeps([395,85,31,196,145]))),WK=R.lazy(()=>ae(()=>import("./VenueChainLandingPage-Bc4IpoZN.js"),__vite__mapDeps([396,397,27,85,161,82,123,174,62,195,35,141]))),ZK=R.lazy(()=>ae(()=>import("./RbTourCityLanding-X2-lsoCp.js"),__vite__mapDeps([398,397,27,85]))),HK=R.lazy(()=>ae(()=>import("./RbTourHub-C_x-w_Re.js"),[])),XK=R.lazy(()=>ae(()=>import("./WristbandCheckinPage-q28_n6NS.js"),__vite__mapDeps([399,4]))),KK=R.lazy(()=>ae(()=>import("./WristbandLandingPage-9FKeaOMb.js"),__vite__mapDeps([400,4,195,174,123]))),YK=R.lazy(()=>ae(()=>import("./ActivationCalendarPage-BfMS2wBI.js"),__vite__mapDeps([401,15,16,9,17,19,18,78,35,44,2]))),QK=R.lazy(()=>ae(()=>import("./ActivationMetricsDashboard-N6dJzqgz.js"),__vite__mapDeps([402,78,17,9,51]))),JK=R.lazy(()=>ae(()=>import("./OutreachQueue-kAPjC2aK.js"),__vite__mapDeps([403,19,78,15,16,9,17,12,20,18,241,4,115,306,110,7,10,80,14]))),eY=R.lazy(()=>ae(()=>import("./CreatorCoursePage-hzhHkmEI.js"),__vite__mapDeps([404,78,318,140,4,5]))),tY=R.lazy(()=>ae(()=>import("./CreatorCourseLessonPage-DVHRyCwF.js"),__vite__mapDeps([405,23,4,89]))),rY=R.lazy(()=>ae(()=>import("./CreatorCourseAssessmentPage-DIygoWel.js"),__vite__mapDeps([406,78,140,144,23,318,4]))),PM=R.lazy(()=>ae(()=>import("./CreatorCourseCertificatePage-DEwKvY8B.js"),__vite__mapDeps([407,23,4,140]))),nY=R.lazy(()=>ae(()=>import("./AdminCreatorCoursePage-BX4B1zRo.js"),__vite__mapDeps([408,18,318,4,144]))),iY=R.lazy(()=>ae(()=>import("./CreatorActivationLanding-D1DM5S4U.js"),__vite__mapDeps([409,18,2,85]))),oY=R.lazy(()=>ae(()=>import("./CreatorActivationHistory-vBGEkjxq.js"),__vite__mapDeps([410,15,16,9,17,18,72]))),sY=R.lazy(()=>ae(()=>import("./CreatorFanTravelCampaign-naBdm5LT.js"),__vite__mapDeps([411,18,51,118,31]))),aY=R.lazy(()=>ae(()=>import("./ScaledReportsPage-BNte9IUj.js"),__vite__mapDeps([412,54,78,35,2,208,25]))),lY=R.lazy(()=>ae(()=>import("./ImpactDashboard-DjougB10.js"),__vite__mapDeps([413,78,18,19,15,16,9,17,62]))),cY=R.lazy(()=>ae(()=>import("./StackingPage-DzwlFI6d.js"),__vite__mapDeps([414,18,260,5,160]))),uY=R.lazy(()=>ae(()=>import("./MyStacksPage-DEIuZSPZ.js"),__vite__mapDeps([415,43,260,31,160,4,144,174]))),dY=R.lazy(()=>ae(()=>import("./ImpactPortfolio-BLYpegeI.js"),__vite__mapDeps([416,78,62]))),hY=R.lazy(()=>ae(()=>import("./AAUHub-BGiTJBep.js"),[])),pY=R.lazy(()=>ae(()=>import("./AAUCityPage-nQECI0pU.js"),__vite__mapDeps([417,418,158,18,159,88,16,4,160,161,82,141,31,54,15,9,17,74,28,26,58,59,14,419,32,35,113]))),fY=R.lazy(()=>ae(()=>import("./AAUMerchantJoin-CQP7_OJe.js"),__vite__mapDeps([420,12,19,20,18,15,16,9,17,74,4,35,14]))),mY=R.lazy(()=>ae(()=>import("./AAUCreatorBrief-CFyQ7_bD.js"),__vite__mapDeps([421,12,19,20,18,15,16,9,17,4,35,2,14]))),gY=R.lazy(()=>ae(()=>import("./DmoDestinationPage-Ds-3uNg4.js"),__vite__mapDeps([422,418,158,18,159,88,16,4,160,161,82,141,31,54,15,9,17,74,28,26,58,59,14,35,2,33,419,32]))),yY=R.lazy(()=>ae(()=>import("./DmoCreatorBrief-BIpGqrOb.js"),__vite__mapDeps([423,12,19,20,18,15,16,9,17,35,2,33,4,14]))),_Y=R.lazy(()=>ae(()=>import("./DmoMerchantJoin-bnzJO02K.js"),__vite__mapDeps([424,12,19,88,16,20,18,15,9,17,35,4,14]))),vY=R.lazy(()=>ae(()=>import("./CreatorProfilePage-Cu8ldL9x.js"),__vite__mapDeps([425,49,31]))),xY=R.lazy(()=>ae(()=>import("./CreatorStorefrontPage-DOUrodqr.js"),__vite__mapDeps([426,95,96,35,9,5]))),bY=R.lazy(()=>ae(()=>import("./AllActiveChainsPage-BziKRxi-.js"),__vite__mapDeps([427,35,97,5]))),wY=R.lazy(()=>ae(()=>import("./DmoWebhookPage-BRy2zcDS.js"),__vite__mapDeps([428,429,4,144,17,9,25]))),SY=R.lazy(()=>ae(()=>import("./DmoDashboardPage-BaRO1jqH.js"),__vite__mapDeps([430,54,18,19,431,118,429,141,85,153,144,352,51,36,169,2]))),TY=R.lazy(()=>ae(()=>
1313import("./DmoEventRegisterPage-Dcg07weM.js"),__vite__mapDeps([432,12,19,20,18,15,16,9,17,85,35,153,14]))),EY=R.lazy(()=>ae(()=>import("./DmoApplyPage-ChPbrUxf.js"),__vite__mapDeps([433,12,19,20,18,15,16,9,17,85,35,10,14]))),PY=R.lazy(()=>ae(()=>import("./DmoDocsPage-DmaXNps3.js"),__vite__mapDeps([434,54,2,429,431,6,51]))),CY=R.lazy(()=>ae(()=>import("./EventsDCPitch-McbU150R.js"),__vite__mapDeps([435,118,352,4,2]))),IY=R.lazy(()=>ae(()=>import("./AAUAdmin-CP8xyNuV.js"),__vite__mapDeps([436,18,19,15,16,9,17,54,74,2,38,41,393,119,144,85]))),MY=R.lazy(()=>ae(()=>import("./AuditLogAdmin-CZGmpBKS.js"),__vite__mapDeps([437,15,16,9,17,54,199]))),AY=R.lazy(()=>ae(()=>import("./GygLinksAdmin-DOCdEato.js"),__vite__mapDeps([438,51,118,31]))),RY=R.lazy(()=>ae(()=>import("./NBAHub-Cw2QR7JR.js"),[])),kY=R.lazy(()=>ae(()=>import("./NBACityPage-QxOQ05Rt.js"),__vite__mapDeps([439,418,158,18,159,88,16,4,160,161,82,141,31,54,15,9,17,74,28,26,58,59,14,35,113,419,32,197]))),DY=R.lazy(()=>ae(()=>import("./NBAAdmin-D0yebEWK.js"),__vite__mapDeps([440,18,19,15,16,9,17,54,74,2,38,41,393,119,144,85]))),LY=R.lazy(()=>ae(()=>import("./NBAMerchantJoin-BrnzDmlB.js"),__vite__mapDeps([441,12,19,20,18,15,16,9,17,74,4,35,14]))),zY=R.lazy(()=>ae(()=>import("./NBACreatorBrief-emXlbXq0.js"),__vite__mapDeps([442,12,19,20,18,15,16,9,17,4,35,2,14]))),OY=R.lazy(()=>ae(()=>import("./NBAActivation-CYJmcbT9.js"),__vite__mapDeps([443,12,19,20,18,15,16,9,17,74,4,35,14]))),FY=R.lazy(()=>ae(()=>import("./ConcertHub-BpVaP0BW.js"),__vite__mapDeps([444,237,57,238,138,4,128]))),jY=R.lazy(()=>ae(()=>import("./ConcertEventPage-CuEmqbP0.js"),__vite__mapDeps([445,418,158,18,159,88,16,4,160,161,82,141,31,54,15,9,17,74,28,26,58,59,14,32,34]))),NY=R.lazy(()=>ae(()=>import("./ConcertMerchantJoin-ZwjQKzVi.js"),__vite__mapDeps([446,12,20,18,19,88,16,15,9,17,85,14]))),BY=R.lazy(()=>ae(()=>import("./ConcertCreatorBrief-oEJDJyaz.js"),__vite__mapDeps([447,12,20,18,19,15,16,9,17,85,14]))),VY=R.lazy(()=>ae(()=>import("./ConcertActivation-7IthSuV5.js"),__vite__mapDeps([448,12,20,18,19,88,16,15,9,17,85,380,14]))),UY=R.lazy(()=>ae(()=>import("./ConcertAdmin-Df-HJ7Mx.js"),__vite__mapDeps([449,12,20,18,19,15,16,9,17,54,46,85,144,14]))),$Y=R.lazy(()=>ae(()=>import("./ChainOpsAdminPage-Ch3KWdLp.js"),__vite__mapDeps([450,74,16,18,193,80,9,27,144,4]))),CM=R.lazy(()=>ae(()=>import("./AASAdScan-Bhig0j7e.js").then(e=>e.A),__vite__mapDeps([451,195,3,271,115,4,182,183,31]))),IM=R.lazy(()=>ae(()=>import("./AASAdSheet-Dya8BB0-.js"),__vite__mapDeps([452,35,84,118,256,364,31,85,144]))),GY=R.lazy(()=>ae(()=>import("./AASHub-Du5w46IQ.js"),__vite__mapDeps([453,451,195,3,271,115,4,182,183,31,18,237,57,238,138,44,71]))),qY=R.lazy(()=>ae(()=>import("./AASCreatorBrief-BxV6tNZJ.js"),__vite__mapDeps([454,18,15,16,9,17,4,35,3]))),WY=R.lazy(()=>ae(()=>import("./AASMerchantJoin-CZw1E5M3.js"),__vite__mapDeps([455,19,18,15,16,9,17,4,35]))),MM=R.lazy(()=>ae(()=>import("./AASQAGuide-DZgPry8I.js"),__vite__mapDeps([456,144,35,256,17,9,4]))),ZY=R.lazy(()=>ae(()=>import("./OktoberfestQAGuide-BUKseMXT.js"),__vite__mapDeps([457,144,35,256,17,9,4]))),HY=R.lazy(()=>ae(()=>import("./RnbTourQAGuide-FaTvnUoH.js"),__vite__mapDeps([458,144,35,256,17,9,4]))),XY=R.lazy(()=>ae(()=>import("./WimbledonQAGuide-tu4gwLv1.js"),__vite__mapDeps([459,144,35,256,17,9,4]))),KY=R.lazy(()=>ae(()=>import("./AASStopCheckin-D-ewq6mO.js"),__vite__mapDeps([460,88,16,451,195,3,271,115,4,182,183,31]))),AM=R.lazy(()=>ae(()=>import("./CFBHub-BUvn0YCy.js"),__vite__mapDeps([461,462,31,26,59,58,160]))),RM=R.lazy(()=>ae(()=>import("./CFBConferencePage-ZJ-MjEu4.js"),__vite__mapDeps([463,35]))),kM=R.lazy(()=>ae(()=>import("./CFBTeamPage-C7nHVY06.js"),__vite__mapDeps([464,35,40,4,103,104]))),DM=R.lazy(()=>ae(()=>import("./CFBGamePage-Bj4jjygj.js"),__vite__mapDeps([465,238,35,26,103,104,51,5]))),YY=R.lazy(()=>ae(()=>import("./CFBAdminPage-C1v6k9jc.js"),__vite__mapDeps([466,18,15,16,9,17,35,4,75]))),LM=R.lazy(()=>ae(()=>import("./NFLAwayHub-Cy-FKxHX.js"),__vite__mapDeps([467,462,31,26,59,58,160,200]))),zM=R.lazy(()=>ae(()=>import("./NFLAwayDivisionPage-D5rNMPsX.js"),__vite__mapDeps([468,35]))),OM=R.lazy(()=>ae(()=>import("./NFLAwayTeamPage-B4Ausfqz.js"),__vite__mapDeps([469,35,26,40,4,103,104]))),FM=R.lazy(()=>ae(()=>import("./NFLAwayGamePage-LMLDtsVf.js"),__vite__mapDeps([470,238,35,26,103,104,51,5]))),QY=R.lazy(()=>ae(()=>import("./NFLAwayAdminPage-CKNh6UfZ.js"),__vite__mapDeps([471,18,15,16,9,17,35,75]))),jM=R.lazy(()=>ae(()=>import("./AwayLeaderboard-BokL8y2t.js"),__vite__mapDeps([472,15,16,9,17,54,35,44,298]))),NM=R.lazy(()=>ae(()=>import("./LockInMerchPage-C_WaQXoV.js"),__vite__mapDeps([473,78,13,14,35,200,5,160,4,31]))),JY=R.lazy(()=>ae(()=>import("./ConferenceSponsorAdminPage-DA03lb2n.js"),__vite__mapDeps([474,15,16,9,17,18,74,35,243,252]))),eQ=R.lazy(()=>ae(()=>import("./UniversityHub-B4W6Owku.js"),__vite__mapDeps([475,476]))),tQ=R.lazy(()=>ae(()=>import("./UniversityPage-DpN1EWGV.js"),__vite__mapDeps([477,78,476,4]))),rQ=R.lazy(()=>ae(()=>import("./UniversityChainPage-TbizydnW.js"),__vite__mapDeps([478,78,476,4,27,160,5]))),nQ=R.lazy(()=>ae(()=>import("./PikeEnterprisePitch-BgcUGauL.js"),__vite__mapDeps([479,78,2,160,4,5]))),iQ=R.lazy(()=>ae(()=>import("./VermontPitchPage-CfI_hRFh.js"),__vite__mapDeps([480,78,51,118,123,4]))),oQ=R.lazy(()=>ae(()=>import("./NikePitch-B7dMLLc9.js"),__vite__mapDeps([481,482,27,5,38,31,2,4,194,483]))),sQ=R.lazy(()=>ae(()=>import("./JColePitch-DQcOSCZe.js"),__vite__mapDeps([484,482,27,144,4,5,194,483]))),aQ=R.lazy(()=>ae(()=>import("./LeBronPitch-CbQfjarb.js"),__vite__mapDeps([485,482,27,5,483,2,194]))),lQ=R.lazy(()=>ae(()=>import("./SabrinaPitch-DF3LzGoe.js"),__vite__mapDeps([486,482,27]))),BM=R.lazy(()=>ae(()=>import("./JoriPitch-CYQyALAO.js"),__vite__mapDeps([487,31]))),cQ=R.lazy(()=>ae(()=>import("./MarqusPitch-BU7qYo7Y.js"),__vite__mapDeps([488,31]))),uQ=R.lazy(()=>ae(()=>import("./ActivationMarketingPlan-CEg0XOdI.js"),__vite__mapDeps([489,2,31]))),dQ=R.lazy(()=>ae(()=>
1313import("./AdCreativeGuide-CKhzRLhm.js"),__vite__mapDeps([490,31,51]))),hQ=R.lazy(()=>ae(()=>import("./GroupDemandFlowPage-DivUGWTu.js"),__vite__mapDeps([491,51,31,192,4]))),pQ=R.lazy(()=>ae(()=>import("./WNBAEconomics-CxQlDRJ-.js"),[])),fQ=R.lazy(()=>ae(()=>import("./RevenueForecast-DRBJlBO3.js"),__vite__mapDeps([492,260,259]))),mQ=R.lazy(()=>ae(()=>import("./SlantWallet-BAeXnLG7.js"),__vite__mapDeps([493,18,15,16,9,17,260,201,160,26,30,3,59]))),gQ=R.lazy(()=>ae(()=>import("./OperatorEarnings-D0LcbZb3.js"),__vite__mapDeps([494,260,35,85,30,17,9]))),yQ=R.lazy(()=>ae(()=>import("./ChainEarnings-AhOnIgSC.js"),__vite__mapDeps([495,35,85,17,9,30]))),_Q=R.lazy(()=>ae(()=>import("./OperatorCalculator-D4I9u7eA.js"),__vite__mapDeps([496,53,16,260,35,118,51]))),vQ=R.lazy(()=>ae(()=>import("./AdminShareMatrix-CyXWacqA.js"),__vite__mapDeps([497,260,35,75]))),xQ=R.lazy(()=>ae(()=>import("./MerchantStopDashboard-BGEQtzkl.js"),__vite__mapDeps([498,260]))),bQ=R.lazy(()=>ae(()=>import("./QATestPlan-Ci7DcbNq.js"),[])),wQ=R.lazy(()=>ae(()=>import("./AdminWristbandOrders-CB7xZlhp.js"),__vite__mapDeps([499,15,16,9,17,35,118,174,85,500,7,31]))),SQ=R.lazy(()=>ae(()=>import("./WristbandJobAid-U_Pv3aTV.js"),__vite__mapDeps([501,35,118,144,115,256,500,195,9,85,65,174,123]))),TQ=R.lazy(()=>ae(()=>import("./EventReadinessConsole-1GsKQvE5.js"),__vite__mapDeps([502,31,51,115,10,4,144,174]))),EQ=R.lazy(()=>ae(()=>import("./AdminCelebrityStops-CdE9OGwm.js"),__vite__mapDeps([503,19,15,16,9,17,18,74,35,119,243]))),PQ=R.lazy(()=>ae(()=>import("./AdminCashDrops-8CvuE_Lw.js"),__vite__mapDeps([504,18,15,16,9,17,35,85,27]))),CQ=R.lazy(()=>ae(()=>import("./StandingPage-BlCkCtRj.js"),__vite__mapDeps([505,140,5,4,30]))),IQ=R.lazy(()=>ae(()=>import("./BookingPipelineHealth-BCufvNsN.js"),__vite__mapDeps([506,35,215,85,169]))),MQ=R.lazy(()=>ae(()=>import("./CapTable-D9z71Qgu.js"),[])),AQ=R.lazy(()=>ae(()=>import("./MadeHoopsROI-DH0coMt2.js"),__vite__mapDeps([507,1]))),VM=R.lazy(()=>ae(()=>import("./CampaignScanLanding-vbIY-uk4.js"),__vite__mapDeps([508,187,103,104,160,27,183,97,174,188,189,23,190,18,88,16,168,30,162,85,1,123,195,51,26]))),RQ=R.lazy(()=>ae(()=>import("./SlantMadeHoopsInternal-Bm--xLOo.js"),[])),kQ=R.lazy(()=>ae(()=>import("./PitchQR-C7T-eJfc.js"),__vite__mapDeps([509,51,118]))),DQ=R.lazy(()=>ae(()=>import("./PresaleOffers-DtsSxgcU.js"),__vite__mapDeps([510,15,16,9,17,350,43,18,19,74,229,160,188,174,88,27,124,195,254,71,4,68,351,31,103,104,25,24,45,119,35,44]))),LQ=R.lazy(()=>ae(()=>import("./SafetySettingsPage-CrSEB0rE.js"),__vite__mapDeps([511,18,202,43,195,115,203,71]))),zQ=R.lazy(()=>ae(()=>import("./SafetyMonitorPage-B00hC7XL.js"),__vite__mapDeps([512,203,85,195]))),OQ=R.lazy(()=>ae(()=>import("./GuardianConsentPage-BILW1JOn.js"),__vite__mapDeps([513,85,144,195]))),FQ=R.lazy(()=>ae(()=>import("./DelegationAcceptPage-BabMVaXR.js"),__vite__mapDeps([514,85,5]))),jQ=R.lazy(()=>ae(()=>import("./DelegationManagePage-DO-Hdi58.js"),__vite__mapDeps([515,38,71,85]))),NQ=R.lazy(()=>ae(()=>import("./SubchainIssuancePage-CaZQzpRJ.js"),__vite__mapDeps([516,18,53,16,254,35,7,31,119]))),BQ=R.lazy(()=>ae(()=>import("./DesignerSubchainPage-BKNQlO-I.js"),__vite__mapDeps([517,254,31,140,118]))),VQ=R.lazy(()=>ae(()=>import("./FlightSearchPage-DEuvSWW2.js"),__vite__mapDeps([518,159,88,16,4,160,161,82,141,31,18,15,9,17,14]))),UQ=R.lazy(()=>ae(()=>import("./PinCreatePage-BmtGe1qI.js"),__vite__mapDeps([519,18,19,15,16,9,17,345,51,31]))),$Q=R.lazy(()=>ae(()=>import("./PinPublicPage-DiXab6F8.js"),__vite__mapDeps([520,18,482,345,71,4,51]))),UM=R.lazy(()=>ae(()=>import("./RestaurantPilotReport-CRZz-1f0.js"),__vite__mapDeps([521,78,118,32,291,289,172,103,104]))),GQ=R.lazy(()=>ae(()=>import("./SponsorPortalPage-CgezUMnj.js"),__vite__mapDeps([522,195,4,38,197,118]))),qQ=R.lazy(()=>ae(()=>import("./SubscriptionsPage-gGd_JdFd.js"),__vite__mapDeps([523,23,524,189,67,31]))),WQ=R.lazy(()=>ae(()=>import("./SubscriptionsSuccessPage-DloIWpfc.js"),__vite__mapDeps([525,4,524,189]))),ZQ=R.lazy(()=>ae(()=>import("./CreditStorePage-CEL_pthN.js"),__vite__mapDeps([526,23,160,3,164]))),HQ=R.lazy(()=>ae(()=>import("./RedeemPage-RZC3mjfu.js"),__vite__mapDeps([527,18,199,23,160,4]))),XQ=R.lazy(()=>ae(()=>import("./ActivationSupportForm-D6gcLwix.js"),__vite__mapDeps([528,12,20,18,19,15,16,9,17,4,14]))),KQ=R.lazy(()=>ae(()=>import("./EcosystemAdmin-BtIPLQ_O.js"),__vite__mapDeps([529,18,19,54,254,15,16,9,17,74,2,4,144,431]))),$M=R.lazy(()=>ae(()=>import("./AthletesAbroadNetwork-ClJpZbNz.js"),__vite__mapDeps([530,2,85]))),YQ=R.lazy(()=>ae(()=>import("./CreatorListStudio-BYM7p5U9.js"),__vite__mapDeps([531,3,68,40,140,17,9,31]))),QQ=R.lazy(()=>ae(()=>import("./CCommerceDashboard-RhsWysJr.js"),__vite__mapDeps([532,18,254,54,289,51]))),JQ=R.lazy(()=>ae(()=>import("./BuilderDirectoryPage-CgaoEe91.js"),__vite__mapDeps([533,15,16,9,17,4,23]))),eJ=R.lazy(()=>ae(()=>
1313import("./BuilderDetailPage-D8pQUnpH.js"),__vite__mapDeps([534,35,4,31,7,2]))),tJ=R.lazy(()=>ae(()=>import("./CertifiedPractitionerDirectoryPage-C83_Pl6Y.js"),__vite__mapDeps([535,195,140,23]))),rJ=R.lazy(()=>ae(()=>import("./CertifiedPractitionerDetailPage-DFOMZhfy.js"),__vite__mapDeps([536,35,195,31]))),nJ=R.lazy(()=>ae(()=>import("./BlueprintLibrary-CDF2mpqI.js"),__vite__mapDeps([537,15,16,9,17,55,5,4,44]))),GM=R.lazy(()=>ae(()=>import("./StarterKitCataloguePage-q82PXTHC.js"),__vite__mapDeps([538,3,5,35,195,4,539]))),iJ=R.lazy(()=>ae(()=>import("./EducatorResourcePackPage-hp-S_9G7.js"),__vite__mapDeps([540,364,31,118,195,4]))),oJ=R.lazy(()=>ae(()=>import("./EducatorSandboxPage-wp_X5Wxq.js"),__vite__mapDeps([541,19,35,364,169,195,4,542]))),sJ=R.lazy(()=>ae(()=>import("./EducatorTermsPage-Cd7JThrA.js"),__vite__mapDeps([543,88,16,35,4,203]))),aJ=R.lazy(()=>ae(()=>import("./VoterInvitationPage-BLJldL2B.js"),__vite__mapDeps([544,539,195,4]))),lJ=R.lazy(()=>ae(()=>import("./VoterTurnoutAdminPage-CaHhGeXU.js"),__vite__mapDeps([545,18,19,195,377,118]))),cJ=R.lazy(()=>ae(()=>import("./AdminBlueprints-CVEmpi29.js"),__vite__mapDeps([546,54,74,16,18,4,38,351,144]))),uJ=R.lazy(()=>ae(()=>import("./AIOrchestratorDemoPage-mmw61X6D.js"),__vite__mapDeps([547,15,16,9,17,53,18,35,80,169,25,144,4,75,30,34]))),dJ=R.lazy(()=>ae(()=>import("./CertificationPage-DNTvbnJ2.js"),__vite__mapDeps([548,19,88,16,169,189,164,241,195,31]))),hJ=R.lazy(()=>ae(()=>import("./CertificationVerifyPage-BninSGeC.js"),__vite__mapDeps([549,548,19,88,16,169,189,164,241,195,31,35]))),pJ=R.lazy(()=>ae(()=>import("./CertificationAdminPage-DQIXsHYN.js"),__vite__mapDeps([550,19,548,88,16,169,189,164,241,195,31,4,97,191,75]))),fJ=R.lazy(()=>ae(()=>import("./CertifiedPartnerPage-Cc3GWQAy.js"),__vite__mapDeps([551,19,195,189,4,144,542,39]))),mJ=R.lazy(()=>ae(()=>import("./CertifiedPartnerSuccessPage-2U7ZiXbM.js"),__vite__mapDeps([552,551,19,195,189,4,144,542,39]))),gJ=R.lazy(()=>ae(()=>import("./CertifiedPartnerAdminPage-1HhGTHZ9.js"),__vite__mapDeps([553,4,144,203]))),yJ=()=>M.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",role:"status","aria-live":"polite",children:M.jsx("div",{className:"text-muted-foreground",children:"Loading…"})});function R1({children:e}){const[r,s]=hc(),{user:u,isLoading:m}=Na(),{data:x,isLoading:v,isError:c}=ip({queryKey:["/api/premium/onboarding/state"],enabled:!!u,retry:1,retryDelay:500,staleTime:0});return R.useEffect(()=>{if(!m&&!v&&!c&&x&&u){const A=r==="/onboarding",L=!x.progress||x.progress.status==="in_progress",z=sessionStorage.getItem("onboarding_just_completed")==="true",j=sessionStorage.getItem("onboarding_skipped")==="true";if(z||j){A||(sessionStorage.removeItem("onboarding_just_completed"),sessionStorage.removeItem("onboarding_skipped"));return}const V=r==="/c-commerce"||r==="/create"||/^\/chains\/[^/]+\/dashboard$/.test(r)||r.startsWith("/professionals")||r==="/athletes-abroad"||r.startsWith("/admin/ecosystem");if(L&&!A&&!V){const Z=sessionStorage.getItem("nfl_referral_city"),K=sessionStorage.getItem("nfl_referral_code");if(Z){sessionStorage.removeItem("nfl_referral_city"),sessionStorage.removeItem("nfl_referral_code"),sessionStorage.setItem("nfl_welcome_city",Z),fetch("/api/premium/onboarding/nfl-skip",{method:"POST",headers:{"Content-Type":"application/json"}}).catch(()=>{});const Y=`/fan-travel/${Z}${K?`?ref=${K}`:""}`;s(Y);return}s("/onboarding")}}},[x,m,v,c,u,r,s]),m||u&&v?M.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",role:"status","aria-live":"polite",children:M.jsx("div",{className:"text-muted-foreground",children:"Loading…"})}):M.jsx(M.Fragment,{children:e})}const k1="cohortJoinIntent";function _J(){const{isAuthenticated:e,isLoading:r}=Na(),[s]=hc();return R.useEffect(()=>{const u=()=>{Gk.invalidateQueries({queryKey:["/api/auth/user"]})},m=x=>{x.persisted&&u()};return window.addEventListener("popstate",u),window.addEventListener("pageshow",m),()=>{window.removeEventListener("popstate",u),window.removeEventListener("pageshow",m)}},[]),R.useEffect(()=>{if(!(!e||r))try{const u=sessionStorage.getItem(k1);if(!u)return;const m=JSON.parse(u);if(!m.bookingRef||!m.trackingConsent){sessionStorage.removeItem(k1);return}sessionStorage.removeItem(k1);const x={bookingRef:m.bookingRef,trackingConsent:!0};m.campaignId?x.campaignId=m.campaignId:m.chainId&&(x.chainId=m.chainId),fetch("/api/direct-booking/post-booking-join",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)}).catch(()=>{})}catch{}},[e,r]),M.jsx(R.Suspense,{fallback:M.jsx(yJ,{}),children:M.jsxs(qC,{children:[M.jsx(ne,{path:"/poster/nba-youngboy",component:QZ}),M.jsx(ne,{path:"/start",component:cK}),M.jsx(ne,{path:"/connector-activation",component:TM}),M.jsx(ne,{path:"/connector-readiness",component:EM}),M.jsx(ne,{path:"/concerts",component:FY}),M.jsx(ne,{path:"/concerts/:artist/:city/merchant-join",component:NY}),M.jsx(ne,{path:"/concerts/:artist/:city/creator-brief",component:BY}),M.jsx(ne,{path:"/concerts/:artist/:city/activation",component:VY}),M.jsx(ne,{path:"/concerts/:artist/:city",component:jY}),M.jsx(ne,{path:"/nba",component:RY}),M.jsx(ne,{path:"/nba/:city/merchant-join",component:LY}),M.jsx(ne,{path:"/nba/:city/creator-brief",component:zY}),M.jsx(ne,{path:"/nba/:city/activation",component:OY}),M.jsx(ne,{path:"/nba/:city",component:kY}),M.jsx(ne,{path:"/university",component:eQ}),M.jsx(ne,{path:"/university/:slug/:sport",component:rQ}),M.jsx(ne,{path:"/university/:slug",component:tQ}),M.jsx(ne,{path:"/pitch/pike-enterprise",component:Pt(nQ)}),M.jsx(ne,{path:"/pitch/vermont",component:Pt(iQ)}),M.jsx(ne,{path:"/destination/:slug/creator-brief",component:yY}),M.jsx(ne,{path:"/destination/:slug/merchant-join",component:_Y}),M.jsx(ne,{path:"/creator/profile/:handle",component:vY}),M.jsx(ne,{path:"/creators/:userId",component:xY}),M.jsx(ne,{path:"/chains/active",component:bY}),M.jsx(ne,{path:"/dmo/webhooks",component:wY}),M.jsx(ne,{path:"/dmo/dashboard",component:SY}),M.jsx(ne,{path:"/dmo/events/register",component:TY}),M.jsx(ne,{path:"/dmo/apply",component:EY}),M.jsx(ne,{path:"/dmo/docs",component:PY}),M.jsx(ne,{path:"/destination/:slug",component:gY}),M.jsx(ne,{path:"/safety/monitor/:shareToken",component:zQ}),M.jsx(ne,{path:"/guardian-consent/:token",component:OQ}),M.jsx(ne,{path:"/delegation/accept/:token",component:FQ}),M.jsx(ne,{path:"/delegation/manage",component:jQ}),M.jsx(ne,{path:"/chains/:chainId/subchains",component:NQ}),M.jsx(ne,{path:"/my-subchains",component:BQ}),M.jsx(ne,{path:"/pin/create",component:UQ}),M.jsx(ne,{path:"/pin/:shareToken",component:$Q}),M.jsx(ne,{path:"/pilot-report/:chainId",component:UM}),M.jsx(ne,{path:"/pilot-report",component:UM}),M.jsx(ne,{path:"/sponsor-report/:campaignId",component:GQ}),M.jsx(ne,{path:"/aau",component:hY}),M.jsx(ne,{path:"/aau/:city/merchant-join",component:fY}),M.jsx(ne,{path:"/aau/:city/creator-brief",component:mY}),M.jsx(ne,{path:"/aau/:city",component:pY}),M.jsx(ne,{path:"/go/aas/lasvegas",component:CM}),M.jsx(ne,{path:"/go/aas/:city",component:CM}),M.jsx(ne,{path:"/aas/stop-checkin",component:KY}),M.jsx(ne,{path:"/aas/creator-brief",component:qY}),M.jsx(ne,{path:"/aas/merchant-join",component:WY}),M.jsx(ne,{path:"/aas/ad-sheet",component:IM}),M.jsx(ne,{path:"/aas",component:GY}),M.jsx(ne,{path:"/nfl/:citySlug",component:eX}),M.jsx(ne,{path:"/go/nfl/:city",component:SK}),M.jsx(ne,{path:"/partners",component:rX}),M.jsx(ne,{path:"/mrr",component:nX}),M.jsx(ne,{path:"/mrr/library",component:oX}),M.jsx(ne,{path:"/mrr/report/demo",component:gM}),M.jsx(ne,{path:"/mrr/report/:campaignId",component:gM}),M.jsx(ne,{path:"/support/activation",component:XQ}),M.jsx(ne,{path:"/flywheel",component:Pt(sX)}),M.jsx(ne,{path:"/pilot",component:Pt(aX)}),M.jsx(ne,{path:"/layers",component:Pt(lX)}),M.jsx(ne,{path:"/event-brief",component:cX}),M.jsx(ne,{path:"/connector-model",component:Pt(uX)}),M.jsx(ne,{path:"/operator-briefs",component:Pt(dX)}),M.jsx(ne,{path:"/rl-drop",component:hX}),M.jsx(ne,{path:"/chain-plan/campaign/:campaignId",component:fX}),M.jsx(ne,{path:"/chain-plan/:id",component:pX}),M.jsx(ne,{path:"/tour/meninas-canido",component:yM}),M.jsx(ne,{path:"/meninas-tour",component:yM}),M.jsx(ne,{path:"/meninas/ad-sheet",component:M1}),M.jsx(ne,{path:"/3x3/ad-sheet",component:M1}),M.jsx(ne,{path:"/jori-pitch",component:Pt(BM)}),M.jsx(ne,{path:"/wc/miami",component:mX}),M.jsx(ne,{path:"/venue/:slug",component:WK}),M.jsx(ne,{path:"/rb-tour",component:HK}),M.jsx(ne,{path:"/rb-tour/:citySlug",component:ZK}),M.jsx(ne,{path:"/checkin/:token",component:XK}),M.jsx(ne,{path:"/wristband",component:KK}),M.jsx(ne,{path:"/nfl-away/:divisionSlug/:teamSlug/:weekParam",component:FM}),M.jsx(ne,{path:"/nfl-away/:divisionSlug/:teamSlug",component:OM}),M.jsx(ne,{path:"/nfl-away/:divisionSlug",component:zM}),M.jsx(ne,{path:"/nfl-away",component:LM}),M.jsx(ne,{path:"/cfb/:conferenceSlug/:teamSlug/:weekParam",component:DM}),M.jsx(ne,{path:"/cfb/:conferenceSlug/:teamSlug",component:kM}),M.jsx(ne,{path:"/cfb/:conferenceSlug",component:RM}),M.jsx(ne,{path:"/cfb",component:AM}),M.jsx(ne,{path:"/away/leaderboard",component:jM}),M.jsx(ne,{path:"/away/merch",component:NM}),M.jsx(ne,{path:"/terms",component:hM}),M.jsx(ne,{path:"/privacy",component:dM}),M.jsx(ne,{path:"/certification/verify/:credentialId",component:hJ}),M.jsx(ne,{path:"/certified-partner/success",component:mJ}),M.jsx(ne,{path:"/certified-partner",component:fJ}),M.jsx(ne,{path:"/certification",component:dJ}),M.jsx(ne,{path:"/sport2026",component:tX}),M.jsx(ne,{path:"/fan-travel",component:XH}),M.jsx(ne,{path:"/fan-travel/ops",component:JH}),M.jsx(ne,{path:"/fan-travel/pass",component:pM}),M.jsx(ne,{path:"/fan-travel/:citySlug/pass",component:pM}),M.jsx(ne,{path:"/fan-travel/:citySlug/merchant-join",component:YH}),M.jsx(ne,{path:"/fan-travel/:citySlug/creator-brief",component:QH}),M.jsx(ne,{path:"/fan-travel/:citySlug",component:KH}),M.jsx(ne,{path:"/integrate/ops",component:yX}),M.jsx(ne,{path:"/integrate",component:gX}),M.jsx(ne,{path:"/activation-report/:token",component:qK}),M.jsx(ne,{path:"/c/:code",component:iY}),M.jsx(ne,{path:"/demo/nfl-madrid",component:Pt(HH)}),M.jsx(ne,{path:"/demo/creator-volleyball",component:Pt(_X)}),M.jsx(ne,{path:"/demo/angel-reese",component:Pt(vX)}),M.jsx(ne,{path:"/demo/influence-tracking",component:Pt(xX)}),M.jsx(ne,{path:"/demo/quick-cuts",component:Pt(bX)}),M.jsx(ne,{path:"/demo/reports",component:A1}),M.jsx(ne,{path:"/ceo",component:qX}),M.jsx(ne,{path:"/ceo/qr",component:WX}),M.jsx(ne,{path:"/qr-onboarding",component:wX}),M.jsx(ne,{path:"/qr-auth",component:SX}),M.jsx(ne,{path:"/qr",component:bM}),M.jsx(ne,{path:"/welcome",component:bM}),M.jsx(ne,{path:"/bookings",component:IH}),M.jsx(ne,{path:"/antioch",component:MH}),M.jsx(ne,{path:"/hotels",component:vJ}),M.jsx(ne,{path:"/flights",component:VQ}),M.jsx(ne,{path:"/discover",component:L_}),M.jsx(ne,{path:"/explore",component:L_}),M.jsx(ne,{path:"/professionals",component:fM}),M.jsx(ne,{path:"/professionals/:id",component:mM}),M.jsx(ne,{path:"/builders",component:JQ}),M.jsx(ne,{path:"/builders/:userId",component:eJ}),M.jsx(ne,{path:"/certified-practitioners",component:tJ}),M.jsx(ne,{path:"/certified-practitioners/:profileId",component:rJ}),M.jsx(ne,{path:"/starter-kits/:kitId",component:GM}),M.jsx(ne,{path:"/starter-kits",component:GM}),M.jsx(ne,{path:"/educators",component:iJ}),M.jsx(ne,{path:"/educator-terms",component:sJ}),M.jsx(ne,{path:"/educator-sandbox",component:oJ}),M.jsx(ne,{path:"/voter-turnout-drive/manage/:chainId",component:lJ}),M.jsx(ne,{path:"/voter-turnout-drive/invite/:token",component:aJ}),M.jsx(ne,{path:"/blueprints",component:nJ}),M.jsx(ne,{path:"/admin/blueprints",component:cJ}),M.jsx(ne,{path:"/athletes-abroad",component:$M}),M.jsx(ne,{path:"/c-commerce",children:()=>r?M.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center",children:M.jsx("div",{className:"text-white",children:"Loading..."})}):e?M.jsx(D_,{children:M.jsx(QQ,{})}):M.jsx(I1,{redirectFrom:"/c-commerce"})}),M.jsx(ne,{path:"/not-found",component:uM}),M.jsx(ne,{path:"/onboarding/campaign/:token",component:TX}),M.jsx(ne,{path:"/onboard/:token",component:R.lazy(()=>ae(()=>import("./PartnerOnboardingPage-B2eGvmM2.js"),__vite__mapDeps([554,12,5,7,85,14])))}),M.jsx(ne,{path:"/pitch",component:Pt(IX)}),M.jsx(ne,{path:"/nike",component:Pt(oQ)}),M.jsx(ne,{path:"/jcole",component:Pt(sQ)}),M.jsx(ne,{path:"/lebron",component:Pt(aQ)}),M.jsx(ne,{path:"/sabrina",component:Pt(lQ)}),M.jsx(ne,{path:"/jori",component:Pt(BM)}),M.jsx(ne,{path:"/wnba-economics",component:Pt(pQ)}),M.jsx(ne,{path:"/revenue-forecast",component:Pt(fQ)}),M.jsx(ne,{path:"/credits",component:ZQ}),M.jsx(ne,{path:"/redeem",component:HQ}),M.jsx(ne,{path:"/slant-wallet",component:mQ}),M.jsx(ne,{path:"/operator-earnings",component:Pt(gQ)}),M.jsx(ne,{path:"/chain-earnings",component:yQ}),M.jsx(ne,{path:"/operator-calculator",component:Pt(_Q)}),M.jsx(ne,{path:"/merchant-stops",component:xQ}),M.jsx(ne,{path:"/qa-test-plan",component:Pt(bQ)}),M.jsx(ne,{path:"/admin/wristband-job-aid",component:SQ}),M.jsx(ne,{path:"/admin/standing",component:bJ}),M.jsx(ne,{path:"/admin/partner-benefits",component:wJ}),M.jsx(ne,{path:"/standing",component:CQ}),M.jsx(ne,{path:"/admin/booking-pipeline",component:IQ}),M.jsx(ne,{path:"/cap-table",component:Pt(MQ)}),M.jsx(ne,{path:"/scan/:campaignId",component:VM}),M.jsx(ne,{path:"/madehoops",component:Pt(AQ)}),M.jsx(ne,{path:"/madehoops/internal",component:Pt(RQ)}),M.jsx(ne,{path:"/marqus",component:Pt(cQ)}),M.jsx(ne,{path:"/pitch/events-dc",component:Pt(CY)}
1313),M.jsx(ne,{path:"/pitch/qr",component:Pt(kQ)}),M.jsx(ne,{path:"/pitch/activation-plan",component:Pt(uQ)}),M.jsx(ne,{path:"/pitch/ad-creative-guide",component:Pt(dQ)}),M.jsx(ne,{path:"/group-demand-flow",component:Pt(hQ)}),M.jsx(ne,{path:"/maturity-model",component:Pt(dK)}),M.jsx(ne,{path:"/demo/kevin-hart-tour",component:Pt(MX)}),M.jsx(ne,{path:"/demo/ces-las-vegas",component:Pt(AX)}),M.jsx(ne,{path:"/demo/pharrell-williams",component:Pt(_M)}),M.jsx(ne,{path:"/demo/pharrel-williams",component:Pt(_M)}),M.jsx(ne,{path:"/agenda/:eventId",component:RX}),M.jsx(ne,{path:"/events/:eventId/experience",component:HX}),M.jsx(ne,{path:"/events/:eventId/register",component:XX}),M.jsx(ne,{path:"/events/:eventId/confirmation/:registrationId",component:KX}),M.jsx(ne,{path:"/demo/cannabis-festival",component:Pt(ZX)}),M.jsx(ne,{path:"/readiness/:campaignId",component:YX}),M.jsx(ne,{path:"/presale/offers",component:DQ}),M.jsx(ne,{path:"/presale",component:$H}),M.jsx(ne,{path:"/demo/Slant-Attribution",component:Pt(wM)}),M.jsx(ne,{path:"/demo/direct-mail",component:Pt(wM)}),M.jsx(ne,{path:"/demo/destination-video",component:Pt(QX)}),M.jsx(ne,{path:"/demo/slant-routes",component:Pt(JX)}),M.jsx(ne,{path:"/demo/marqus-blakely",component:Pt(eK)}),M.jsx(ne,{path:"/connector-activation",component:TM}),M.jsx(ne,{path:"/connector-readiness",component:EM}),M.jsx(ne,{path:"/join/:token",component:kX}),M.jsx(ne,{path:"/trip-invite/:token",component:TH}),M.jsx(ne,{path:"/group-trip",component:xH}),M.jsx(ne,{path:"/group-trip/proposal",component:bH}),M.jsx(ne,{path:"/group-trip/share/:token",component:wH}),M.jsx(ne,{path:"/group-trip/status/:token",component:SH}),M.jsx(ne,{path:"/admin/qa-guide/aas-vegas",component:Pt(MM)}),M.jsx(ne,{path:"/admin/qa-guide/oktoberfest-2026",component:Pt(ZY)}),M.jsx(ne,{path:"/admin/qa-guide/rnb-tour-2026",component:Pt(HY)}),M.jsx(ne,{path:"/admin/qa-guide/wimbledon-2026",component:Pt(XY)}),M.jsx(ne,{path:"/nil/follow/:athleteId",component:zX}),M.jsx(ne,{path:"/athlete/:athleteId",component:OX}),M.jsx(ne,{path:"/slides/:shareCode",component:NX}),M.jsx(ne,{path:"/impact/:userId",component:dY}),M.jsx(ne,{path:"/view/:id",component:UX}),M.jsx(ne,{path:"/creator/onboarding",component:xM}),M.jsx(ne,{path:"/creator/onboarding/:creatorId",component:xM}),M.jsx(ne,{path:"/staff/redemption/:offerId",component:rK}),M.jsx(ne,{path:"/campaign/:campaignId/dashboard",component:nK}),M.jsx(ne,{path:"/campaign-intelligence",component:oK}),M.jsx(ne,{path:"/campaign-ops",component:sK}),M.jsx(ne,{path:"/creator-studio-agent",component:aK}),M.jsx(ne,{path:"/certificate/:certificateId",component:DH}),M.jsx(ne,{path:"/creator/course/verify/:id",component:PM}),M.jsx(ne,{path:"/chains/:id/dashboard",children:()=>e?M.jsx(R1,{children:M.jsx(D_,{children:M.jsx(uK,{})})}):M.jsx(I1,{redirectFrom:s})}),M.jsx(ne,{path:"/chains/:id",children:()=>M.jsx(R1,{children:M.jsx(D_,{children:M.jsx(kH,{})})})}),M.jsx(ne,{children:()=>r?M.jsx("div",{className:"min-h-screen bg-primary flex items-center justify-center",children:M.jsx("div",{className:"text-white",children:"Loading..."})}):e?M.jsx(R1,{children:M.jsx(D_,{children:M.jsxs(qC,{children:[M.jsx(ne,{path:"/",component:JZ}),M.jsx(ne,{path:"/destinations",component:tK}),M.jsx(ne,{path:"/destinations/:id",component:eH}),M.jsx(ne,{path:"/routes",component:tH}),M.jsx(ne,{path:"/routes/new",component:iH}),M.jsx(ne,{path:"/routes/:id",component:rH}),M.jsx(ne,{path:"/routes/:id/edit",component:nH}),M.jsx(ne,{path:"/notes",component:oH}),M.jsx(ne,{path:"/checklists",component:sH}),M.jsx(ne,{path:"/video-analysis",component:aH}),M.jsx(ne,{path:"/discover",component:L_}),M.jsx(ne,{path:"/explore",component:L_}),M.jsx(ne,{path:"/professionals",component:fM}),M.jsx(ne,{path:"/professionals/:id",component:mM}),M.jsx(ne,{path:"/athletes-abroad",component:$M}),M.jsx(ne,{path:"/admin/ecosystem",component:KQ}),M.jsx(ne,{path:"/content-wall",component:lH}),M.jsx(ne,{path:"/creator-studio",component:uH}),M.jsx(ne,{path:"/influencer-qr-studio",component:EX}),M.jsx(ne,{path:"/templates",component:mH}),M.jsx(ne,{path:"/video-discovery",component:gH}),M.jsx(ne,{path:"/community",component:dH}),M.jsx(ne,{path:"/community/:id",component:hH}),M.jsx(ne,{path:"/recommendations",component:pH}),M.jsx(ne,{path:"/chat",component:fH}),M.jsx(ne,{path:"/profile/:userId",component:yH}),M.jsx(ne,{path:"/destinations/:id/creators/:creatorId",component:cH}),M.jsx(ne,{path:"/group-trips",component:_H}),M.jsx(ne,{path:"/group-trips/:id",component:vH}),M.jsx(ne,{path:"/trips/new",component:pK}),M.jsx(ne,{path:"/scout-checkin/:qrToken",component:EH}),M.jsx(ne,{path:"/events",component:PH}),M.jsx(ne,{path:"/admin/youth-sports",component:CH}),M.jsx(ne,{path:"/admin/aau",component:IY}),M.jsx(ne,{path:"/admin/nba",component:DY}),M.jsx(ne,{path:"/admin/concerts",component:UY}),M.jsx(ne,{path:"/admin/aas-ads",component:IM}),M.jsx(ne,{path:"/admin/qa-guide/aas-vegas",component:Pt(MM)}),M.jsx(ne,{path:"/admin/qa-seed",component:Pt(EK)}),M.jsx(ne,{path:"/admin/ai-offer-demo",component:Pt(uJ)}),M.jsx(ne,{path:"/admin/cfb",component:YY}),M.jsx(ne,{path:"/cfb/:conferenceSlug/:teamSlug/:weekParam",component:DM}),M.jsx(ne,{path:"/cfb/:conferenceSlug/:teamSlug",component:kM}),M.jsx(ne,{path:"/cfb/:conferenceSlug",component:RM}),M.jsx(ne,{path:"/cfb",component:AM}),M.jsx(ne,{path:"/admin/nfl-away",component:QY}),M.jsx(ne,{path:"/nfl-away/:divisionSlug/:teamSlug/:weekParam",component:FM}),M.jsx(ne,{path:"/nfl-away/:divisionSlug/:teamSlug",component:OM}),M.jsx(ne,{path:"/nfl-away/:divisionSlug",component:zM}),M.jsx(ne,{path:"/nfl-away",component:LM}),M.jsx(ne,{path:"/away/leaderboard",component:jM}),M.jsx(ne,{path:"/away/merch",component:NM}),M.jsx(ne,{path:"/admin/conference-sponsors",component:JY}),M.jsx(ne,{path:"/admin/audit-log",component:MY}),M.jsx(ne,{path:"/admin/gyg-links",component:AY}),M.jsx(ne,{path:"/admin/mrr",component:iX}),M.jsx(ne,{path:"/itinerary-builder",component:AH}),M.jsx(ne,{path:"/privacy",component:dM}),M.jsx(ne,{path:"/terms",component:hM}),M.jsx(ne,{path:"/settings/profile",component:BX}),M.jsx(ne,{path:"/chains",component:RH}),M.jsx(ne,{path:"/wallet",component:LH}),M.jsx(ne,{path:"/create",component:lK}),M.jsx(ne,{path:"/discounts",component:DX}),M.jsx(ne,{path:"/athlete-analytics",component:vM}),M.jsx(ne,{path:"/athlete-analytics/:eventId",component:vM}),M.jsx(ne,{path:"/live",component:zH}),M.jsx(ne,{path:"/traveler-graph",component:OH}),M.jsx(ne,{path:"/marketplace",component:FH}),M.jsx(ne,{path:"/dashboard",component:jH}),M.jsx(ne,{path:"/onboarding",component:NH}),M.jsx(ne,{path:"/reel-studio",component:BH}
1313),M.jsx(ne,{path:"/creator-analytics",component:VH}),M.jsx(ne,{path:"/creator-recognition",component:kK}),M.jsx(ne,{path:"/identity-capital",component:GX}),M.jsx(ne,{path:"/become-creator",component:UH}),M.jsx(ne,{path:"/safety",component:LQ}),M.jsx(ne,{path:"/reports",component:A1}),M.jsx(ne,{path:"/reports/global",component:aY}),M.jsx(ne,{path:"/activation-calendar",component:YK}),M.jsx(ne,{path:"/activation-metrics",component:QK}),M.jsx(ne,{path:"/outreach-queue",component:JK}),M.jsx(ne,{path:"/creator-activation-history",component:oY}),M.jsx(ne,{path:"/creator/fan-travel",component:sY}),M.jsx(ne,{path:"/creator/list-studio",component:YQ}),M.jsx(ne,{path:"/campaign-reports",component:NK}),M.jsx(ne,{path:"/merchant/portal",component:GH}),M.jsx(ne,{path:"/campaigns/:campaignId/presale",component:qH}),M.jsx(ne,{path:"/partner/:partnerId/presale/:packageId",component:WH}),M.jsx(ne,{path:"/merchant/quick-start/:enrollmentId",component:ZH}),M.jsx(ne,{path:"/campaigns/create",component:hK}),M.jsx(ne,{path:"/campaigns/:campaignId/edit",component:fK}),M.jsx(ne,{path:"/campaigns/:campaignId/billing",component:mK}),M.jsx(ne,{path:"/scanner/:campaignId",component:_K}),M.jsx(ne,{path:"/campaigns/:campaignId/tickets",component:vK}),M.jsx(ne,{path:"/admin/ticket-inventory",component:xK}),M.jsx(ne,{path:"/admin/ticket-job-aid",component:wK}),M.jsx(ne,{path:"/admin/nfl-europe-ads",component:TK}),M.jsx(ne,{path:"/admin/meninas-ads",component:M1}),M.jsx(ne,{path:"/tickets/search",component:bK}),M.jsx(ne,{path:"/tickets/success",component:CK}),M.jsx(ne,{path:"/tickets/:id",component:PK}),M.jsx(ne,{path:"/campaigns/:campaignId",component:gK}),M.jsx(ne,{path:"/venue/claim",component:yK}),M.jsx(ne,{path:"/telemetry",component:iK}),M.jsx(ne,{path:"/geofences/create",component:IK}),M.jsx(ne,{path:"/geofences/:id/edit",component:AK}),M.jsx(ne,{path:"/geofences/:id",component:MK}),M.jsx(ne,{path:"/geofences",component:RK}),M.jsx(ne,{path:"/majority-report",component:A1}),M.jsx(ne,{path:"/events",component:PX}),M.jsx(ne,{path:"/event-host",component:LK}),M.jsx(ne,{path:"/event-kit/:programId/review",component:zK}),M.jsx(ne,{path:"/events/create",component:DK}),M.jsx(ne,{path:"/events/:eventId/manage",component:OK}),M.jsx(ne,{path:"/events/scanner",component:SM}),M.jsx(ne,{path:"/events/:eventId/analytics",component:FK}),M.jsx(ne,{path:"/events/:eventId/scanner",component:SM}),M.jsx(ne,{path:"/events/:eventId",component:CX}),M.jsx(ne,{path:"/event-planner",children:()=>(window.location.replace("/creator-studio?tab=events"),null)}),M.jsx(ne,{path:"/my-events",component:FX}),M.jsx(ne,{path:"/connector-dashboard",component:jK}),M.jsx(ne,{path:"/nil",component:LX}),M.jsx(ne,{path:"/settings/social-accounts",component:jX}),M.jsx(ne,{path:"/creator/course/assessment",component:rY}),M.jsx(ne,{path:"/creator/course/certificate",component:PM}),M.jsx(ne,{path:"/creator/course/lessons/:id",component:tY}),M.jsx(ne,{path:"/creator/course",component:eY}),M.jsx(ne,{path:"/admin/creator-course",component:nY}),M.jsx(ne,{path:"/creator/upload",component:VX}),M.jsx(ne,{path:"/subscriptions",component:qQ}),M.jsx(ne,{path:"/subscriptions/success",component:WQ}),M.jsx(ne,{path:"/rewards",component:$X}),M.jsx(ne,{path:"/investor-briefs",component:Pt(BK)}),M.jsx(ne,{path:"/activation-guides",component:VK}),M.jsx(ne,{path:"/qr-studio",component:UK}),M.jsx(ne,{path:"/qr-chain-packs",component:$K}),M.jsx(ne,{path:"/my-pack/:packId",component:GK}),M.jsx(ne,{path:"/impact",component:lY}),M.jsx(ne,{path:"/stacking",component:cY}),M.jsx(ne,{path:"/my-stacks",component:uY}),M.jsx(ne,{path:"/admin/share-matrix",component:vQ}),M.jsx(ne,{path:"/admin/wristbands",component:wQ}),M.jsx(ne,{path:"/admin/event-readiness",component:Pt(TQ)}),M.jsx(ne,{path:"/admin/celebrity-stops",component:EQ}),M.jsx(ne,{path:"/admin/cash-drops",component:PQ}),M.jsx(ne,{path:"/admin/chain-ops",component:$Y}),M.jsx(ne,{path:"/admin/certification",component:pJ}),M.jsx(ne,{path:"/admin/certified-partners",component:gJ}),M.jsx(ne,{path:"/scan/:campaignId",component:VM}),M.jsx(ne,{component:uM})]})})}):M.jsx(I1,{redirectFrom:s!=="/"?`${s}${window.location.search}`:null})})]})})}function vJ(){const[,e]=hc();return R.useEffect(()=>
1313{const r=new URLSearchParams(window.location.search),s=new URLSearchParams;s.set("tab","live-search");const u=r.get("city"),m=r.get("chainId"),x=r.get("campaignId");u&&s.set("city",u),m&&s.set("chainId",m),x&&s.set("campaignId",x),e(`/bookings?${s.toString()}`,{replace:!0})},[]),null}function xJ(){return M.jsx(VZ,{children:M.jsx(N6,{client:Gk,children:M.jsx(E7,{defaultTheme:"dark",storageKey:"slant-ui-theme",children:M.jsx(mL,{children:M.jsx(E$,{children:M.jsxs(m$,{children:[M.jsx(BV,{}),M.jsx(_J,{})]})})})})})})}const bJ=R.lazy(()=>ae(()=>import("./AdminStanding-Bo648rPm.js"),__vite__mapDeps([555,9,72]))),wJ=R.lazy(()=>ae(()=>import("./AdminPartnerBenefits-CAwwRrZF.js"),__vite__mapDeps([556,4,9,144]))),D1=document.getElementById("root");if(D1)try{mk(D1).render(M.jsx(xJ,{}))}catch(e){console.error("Failed to render app:",e),D1.innerHTML=`<div style="padding: 20px; font-family: system-ui;">
1314      <h1>Something went wrong</h1>
1315      <p>Please try refreshing the page.</p>
1316      <pre style="background: #f0f0f0; padding: 10px; overflow: auto;">${e instanceof Error?e.message:String(e)}</pre>
1317    </div>`}else console.error("Root element not found");if(typeof window<"u"){try{sessionStorage.removeItem("slant_chunk_reload")}catch{}try{const e=new URL(window.location.href);e.searchParams.has("_sw")&&(e.searchParams.delete("_sw"),window.history.replaceState({},"",e.pathname+e.search+e.hash))}catch{}BZ().then(()=>{pB()}).catch(e=>{console.warn("Service worker registration failed:",e)})}export{qW as $,w8 as A,sn as B,A3 as C,q9 as D,kh as E,H_ as F,O8 as G,_D as H,L8 as I,C8 as J,eZ as K,xD as L,vn as M,tZ as N,s3 as O,ec as P,Rh as Q,u6 as R,Kb as S,xS as T,Yo as U,eV as V,ip as W,pg as X,$8 as Y,ev as Z,qw as _,nZ as a,F8 as a$,S3 as a0,ZW as a1,XW as a2,KW as a3,R3 as a4,HW as a5,U8 as a6,Fu as a7,SD as a8,K8 as a9,aM as aA,Q_ as aB,ln as aC,E8 as aD,bD as aE,S8 as aF,qn as aG,xq as aH,ZJ as aI,rA as aJ,d4 as aK,P8 as aL,f0 as aM,pc as aN,J_ as aO,_i as aP,pO as aQ,uZ as aR,YJ as aS,O3 as aT,F3 as aU,j3 as aV,N3 as aW,N8 as aX,Xb as aY,ro as aZ,KJ as a_,rZ as aa,wo as ab,XJ as ac,ED as ad,b8 as ae,YS as af,mL as ag,b7 as ah,w7 as ai,gL as aj,Ms as ak,hW as al,mp as am,Q8 as an,L3 as ao,pS as ap,ut as aq,V8 as ar,Ww as as,k8 as at,W8 as au,q8 as av,Y8 as aw,Zm as ax,TD as ay,fm as az,R8 as b,Iq as b$,jz as b0,Nz as b1,X8 as b2,vD as b3,D8 as b4,rV as b5,EJ as b6,D_ as b7,wD as b8,PD as b9,sL as bA,hg as bB,fp as bC,A0 as bD,HJ as bE,R0 as bF,xp as bG,vg as bH,xg as bI,k0 as bJ,vp as bK,rT as bL,C$ as bM,XU as bN,X$ as bO,K$ as bP,AL as bQ,oZ as bR,UJ as bS,wq as bT,GJ as bU,uW as bV,WJ as bW,tM as bX,qJ as bY,iZ as bZ,tV as b_,on as ba,fr as bb,to as bc,kt as bd,FS as be,ug as bf,no as bg,nL as bh,YB as bi,iL as bj,xt as bk,d0 as bl,Fi as bm,lg as bn,v0 as bo,fS as bp,Kr as bq,zs as br,OL as bs,CL as bt,NS as bu,jS as bv,cg as bw,op as bx,oL as by,Q9 as bz,qk as c,Tq as c0,TJ as c1,z8 as c2,iV as c3,$l as c4,ae as c5,AJ as c6,Jz as c7,Wm as c8,MJ as c9,kv as cA,Ck as cB,R6 as cC,B6 as cD,$6 as cE,Z6 as cF,G6 as cG,q6 as cH,gi as cI,X6 as cJ,tI as cK,W6 as cL,$k as cM,IJ as ca,CJ as cb,mD as cc,j8 as cd,M8 as ce,g$ as cf,jJ as cg,FJ as ch,NI as ci,P_ as cj,jI as ck,NJ as cl,DJ as cm,zJ as cn,LJ as co,OJ as cp,T8 as cq,Sq as cr,Hb as cs,El as ct,I8 as cu,Uk as cv,nV as cw,ic as cx,pp as cy,yn as cz,A8 as d,H8 as e,Na as f,P$ as g,W9 as h,it as i,M as j,Fz as k,BJ as l,X9 as m,yD as n,hu as o,pI as p,Gk as q,R as r,VJ as s,EL as t,hc as u,n3 as v,i3 as w,o3 as x,J8 as y,Z8 as z};

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.